Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos found by codespell #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions framing_format.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions snappy-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion snappy-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down