Fix typos found by codespell

This commit is contained in:
Dimitri Papadopoulos 2023-07-29 13:08:14 +02:00
parent 27f34a580b
commit c6bdc8a186
No known key found for this signature in database
GPG key ID: 95998121D9D25F5D
3 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
Snappy framing format description
Last revised: 2013-10-25
This format decribes a framing format for Snappy, allowing compressing to
This document describes a framing format for Snappy, allowing compression of
files or streams that can then more easily be decompressed without having
to hold the entire stream in memory. It also provides data checksums to
help verify integrity. It does not provide metadata checksums, so it does
@ -95,7 +95,7 @@ easily use small fixed-size buffers.
4.3. Uncompressed data (chunk type 0x01)
Uncompressed data chunks allow a compressor to send uncompressed,
raw data; this is useful if, for instance, uncompressible or
raw data; this is useful if, for instance, incompressible or
near-incompressible data is detected, and faster decompression is desired.
As in the compressed chunks, the data is preceded by its own masked

View file

@ -223,10 +223,10 @@ static inline std::pair<size_t, bool> FindMatchLength(const char* s1,
// *data = ConditionalMove(matched_bytes < 4, UNALIGNED_LOAD64(s2),
// UNALIGNED_LOAD64(s2 + 4) >> ((matched_bytes & 3) * 8);
//
// Writen like above this is not a big win, the conditional move would be
// Written like above this is not a big win, the conditional move would be
// a cmp followed by a cmov (2 cycles) followed by a shift (1 cycle).
// However matched_bytes < 4 is equal to
// static_cast<uint32_t>(xorval) != 0. Writen that way, the conditional
// static_cast<uint32_t>(xorval) != 0. Written that way, the conditional
// move (2 cycles) can execute in parallel with FindLSBSetNonZero64
// (tzcnt), which takes 3 cycles.
uint64_t xorval = a1 ^ a2;

View file

@ -366,7 +366,7 @@ int ZLib::UncompressInit(Bytef *dest, uLongf *destLen,
// If you compressed your data a chunk at a time, with CompressChunk,
// you can uncompress it a chunk at a time with UncompressChunk.
// Only difference bewteen chunked and unchunked uncompression
// Only difference between chunked and unchunked uncompression
// is the flush mode we use: Z_SYNC_FLUSH (chunked) or Z_FINISH (unchunked).
int ZLib::UncompressAtMostOrAll(Bytef *dest, uLongf *destLen,
const Bytef *source, uLong *sourceLen,