diff --git a/framing_format.txt b/framing_format.txt index 9764e83..fa19d95 100644 --- a/framing_format.txt +++ b/framing_format.txt @@ -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 diff --git a/snappy-internal.h b/snappy-internal.h index 39fbda5..983ff8b 100644 --- a/snappy-internal.h +++ b/snappy-internal.h @@ -223,10 +223,10 @@ static inline std::pair 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(xorval) != 0. Writen that way, the conditional + // static_cast(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; diff --git a/snappy-test.cc b/snappy-test.cc index aae6072..64ac911 100644 --- a/snappy-test.cc +++ b/snappy-test.cc @@ -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,