Merge pull request #156 from karpinski/master

Fix typos in some of the files under enc/ and dec/.
This commit is contained in:
szabadka 2015-09-21 21:23:50 +02:00
commit 0eddc604e8
9 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@
CONTEXT_SIGNED: second-order context model tuned for signed integers.
The context id for the UTF8 context model is calculated as follows. If p1
and p2 are the previous two bytes, we calcualte the context as
and p2 are the previous two bytes, we calculate the context as
context = kContextLookup[p1] | kContextLookup[p2 + 256].

View File

@ -422,7 +422,7 @@ static BROTLI_INLINE int ReadBlockLength(const HuffmanCode* table,
To reduce the cost of initialization, we reuse L, remember the upper bound
of Y values, and reinitialize only first elements in L.
Most of input values are 0 and 1. To reduce number of brances, we replace
Most of input values are 0 and 1. To reduce number of branches, we replace
inner for loop with do-while.
*/
static BROTLI_NOINLINE void InverseMoveToFrontTransform(uint8_t* v, int v_len,
@ -1283,7 +1283,7 @@ postDecodeLiterals:
s->distance_code = s->dist_rb[s->dist_rb_idx & 3];
goto postReadDistance; /* We already have the implicit distance */
}
/* Read distance code in the command, unless it was implicitely zero. */
/* Read distance code in the command, unless it was implicitly zero. */
BROTLI_DCHECK(s->distance_code < 0);
if (s->block_length[2] == 0) {
/* Block switch for distance codes */

View File

@ -58,7 +58,7 @@ int BrotliBuildSimpleHuffmanTable(HuffmanCode* table,
uint16_t *symbols,
uint32_t num_symbols);
/* Contains a collection of huffman trees with the same alphabet size. */
/* Contains a collection of Huffman trees with the same alphabet size. */
typedef struct {
HuffmanCode** htrees;
HuffmanCode* codes;

View File

@ -110,7 +110,7 @@ double PopulationCost(const Histogram<kSize>& histogram) {
++depth_histo[depth];
++i;
} else {
// Compute the run length of zeros and add the appropiate number of 0 and
// Compute the run length of zeros and add the appropriate number of 0 and
// 17 code length codes to the code length code histogram.
int reps = 1;
for (int k = i + 1; k < kSize && histogram.data_[k] == 0; ++k) {

View File

@ -860,8 +860,8 @@ bool StoreUncompressedMetaBlock(bool final_block,
// compatible with WriteBits.
brotli::WriteBitsPrepareStorage(*storage_ix, storage);
// Since the uncomressed block itself may not be the final block, add an empty
// one after this.
// Since the uncompressed block itself may not be the final block, add an
// empty one after this.
if (final_block) {
brotli::WriteBits(1, 1, storage_ix, storage); // islast
brotli::WriteBits(1, 1, storage_ix, storage); // isempty

View File

@ -23,7 +23,7 @@ namespace brotli {
// Second-order context lookup table for UTF8 byte streams.
//
// If p1 and p2 are the previous two bytes, we calcualte the context as
// If p1 and p2 are the previous two bytes, we calculate the context as
//
// context = kUTF8ContextLookup[p1] | kUTF8ContextLookup[p2 + 256].
//

View File

@ -47,7 +47,7 @@ void CreateHuffmanTree(const int *data,
// counts contains the population counts.
int OptimizeHuffmanCountsForRle(int length, int* counts);
// Write a huffman tree from bit depths into the bitstream representation
// Write a Huffman tree from bit depths into the bitstream representation
// of a Huffman tree. The generated Huffman tree is to be compressed once
// more using a Huffman tree
void WriteHuffmanTree(const uint8_t* depth,

View File

@ -61,7 +61,7 @@ class RingBuffer {
// Copy into the end of the buffer, including the tail buffer.
memcpy(&buffer_[masked_pos], bytes,
std::min(n, ((1 << window_bits_) + tail_size_) - masked_pos));
// Copy into the begining of the buffer
// Copy into the beginning of the buffer
memcpy(&buffer_[0], bytes + ((1 << window_bits_) - masked_pos),
n - ((1 << window_bits_) - masked_pos));
}

View File

@ -76,7 +76,7 @@ bool FindAllStaticDictionaryMatches(const uint8_t* data,
AddMatch(id, l, l, matches);
found_match = true;
}
// Transfroms "" + kOmitLast1 + "" and "" + kOmitLast1 + "ing "
// Transforms "" + kOmitLast1 + "" and "" + kOmitLast1 + "ing "
if (matchlen >= l - 1) {
AddMatch(id + 12 * n, l - 1, l, matches);
if (l + 2 < max_length &&