RPNX::Compress
Self-contained C++20 compression and ZIP library
 
Loading...
Searching...
No Matches
rpnx::compression::implementation::crc32_accumulator Class Reference

Incremental reflected IEEE CRC-32 accumulator. More...

#include <io.hpp>

Public Member Functions

void update (std::byte value) noexcept
 Includes one byte in the checksum.
 
std::uint32_t value () const noexcept
 Returns the checksum for all bytes supplied so far.
 

Detailed Description

Incremental reflected IEEE CRC-32 accumulator.

Definition at line 168 of file io.hpp.

Member Function Documentation

◆ update()

void rpnx::compression::implementation::crc32_accumulator::update ( std::byte value)
inlinenoexcept

Includes one byte in the checksum.

Parameters
valueNext byte in stream order.

Definition at line 175 of file io.hpp.

References value().

Referenced by rpnx::compression::deflate_codec::compress(), rpnx::compression::xz_codec::compress(), rpnx::compression::deflate_codec::decompress(), and rpnx::compression::xz_codec::decompress().

◆ value()

std::uint32_t rpnx::compression::implementation::crc32_accumulator::value ( ) const
inlinenodiscardnoexcept

Returns the checksum for all bytes supplied so far.

Returns
Finalized reflected IEEE CRC-32 value.

Definition at line 189 of file io.hpp.

Referenced by rpnx::compression::deflate_codec::compress(), rpnx::compression::xz_codec::compress(), rpnx::compression::deflate_codec::decompress(), rpnx::compression::xz_codec::decompress(), and update().


The documentation for this class was generated from the following file: