Struct Crc32.Accumulator
- Namespace
- Archiver.Core.IO
- Assembly
- Archiver.Core.dll
Running CRC-32 state for computing a hash incrementally across chunks read from a
stream that is simultaneously being piped elsewhere (e.g. into a compressor) — used by
Services.Zip.ZipEntryWriter so uncompressed bytes are hashed in the same single
read pass as compression, instead of requiring a second full read of the source file.
public struct Crc32.Accumulator
- Inherited Members
Constructors
Accumulator()
Starts a new running CRC-32 in its initial state.
public Accumulator()
Methods
Finish()
Returns the final CRC-32 value for all bytes fed so far.
public readonly uint Finish()
Returns
Update(ReadOnlySpan<byte>)
Folds another chunk of bytes into the running CRC-32.
public void Update(ReadOnlySpan<byte> data)
Parameters
dataReadOnlySpan<byte>