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 #1242

Open
wants to merge 1 commit into
base: master
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 c/enc/block_splitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void BrotliSplitBlock(MemoryManager* m,
CopyLiteralsToByteArray(cmds, num_commands, data, pos, mask, literals);
/* Create the block split on the array of literals.
* Literal histograms can have alphabet size up to 256.
* Though, to accomodate context modeling, less than half of maximum size
* Though, to accommodate context modeling, less than half of maximum size
* is allowed. */
SplitByteVectorLiteral(
m, literals, literals_count,
Expand All @@ -150,7 +150,7 @@ void BrotliSplitBlock(MemoryManager* m,
if (BROTLI_IS_OOM(m)) return;
BROTLI_FREE(m, literals);
/* NB: this might be a good place for injecting extra splitting without
* increasing encoder complexity; however, output parition would be less
* increasing encoder complexity; however, output partition would be less
* optimal than one produced with forced splitting inside
* SplitByteVector (FindBlocks / ClusterBlocks). */
}
Expand Down
2 changes: 1 addition & 1 deletion c/enc/block_splitter_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static size_t FN(FindBlocks)(const DataType* data, const size_t length,
size_t j;
BROTLI_DCHECK(num_histograms <= 256);

/* Trivial case: single historgram -> single block type. */
/* Trivial case: single histogram -> single block type. */
if (num_histograms <= 1) {
for (i = 0; i < length; ++i) {
block_id[i] = 0;
Expand Down
2 changes: 1 addition & 1 deletion c/enc/encoder_dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Dictionary hierarchy for Encoder:
---BrotliEncoderDictionary [up to 64x]
= for each context, precomputed static dictionary with words + transforms

Dictionary hiearchy from common: similar, but without precomputed hashes
Dictionary hierarchy from common: similar, but without precomputed hashes
-BrotliSharedDictionary
--BrotliDictionary [up to 64x]
--BrotliTransforms [up to 64x]
Expand Down
2 changes: 1 addition & 1 deletion c/enc/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct {
void* extra[4];

/**
* False before the fisrt invocation of HasherSetup (where "extra" memory)
* False before the first invocation of HasherSetup (where "extra" memory)
* is allocated.
*/
BROTLI_BOOL is_setup_;
Expand Down
2 changes: 1 addition & 1 deletion java/org/brotli/dec/Decode.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private static int decodeWindowBits(State s) {
/* Change the meaning of flag. Before that step it means "decoder must be capable of reading
* "large-window" brotli stream. After this step it means that "large-window" feature
* is actually detected. Despite the window size could be same as before (lgwin = 10..24),
* encoded distances are allowed to be much greater, thus bigger dictinary could be used. */
* encoded distances are allowed to be much greater, thus bigger dictionary could be used. */
final int largeWindowEnabled = s.isLargeWindow;
s.isLargeWindow = 0;

Expand Down
2 changes: 1 addition & 1 deletion java/org/brotli/dec/DictionaryData.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class DictionaryData {
* Encoded interval lengths, where 7-th bit is constant.
*
* To avoid multibyte UTF-8 runes, DATAx literals contain only 7-bit characters.
* 7-th bit of original data is well compressed with RLE. As there are only 2 alterating values,
* 7-th bit of original data is well compressed with RLE. As there are only 2 alternating values,
* only the lengths of the series are stored.
*/
private static final String SKIP_FLIP = "\u06F7%\u018C'T%\u0085'W%\u00D7%O%g%\u00A6&\u0193%\u01E5&>&*&'&^&\u0088\u0178\u0C3E&\u01AD&\u0192&)&^&%&'&\u0082&P&1&\u00B1&3&]&m&u&E&t&C&\u00CF&V&V&/&>&6&\u0F76\u177Co&p&@&E&M&P&x&@&F&e&\u00CC&7&:&(&D&0&C&)&.&F&-&1&(&L&F&1\u025E*\u03EA\u21F3&\u1372&K&;&)&E&H&P&0&?&9&V&\u0081&-&v&a&,&E&)&?&=&'&'&B&\u0D2E&\u0503&\u0316*&*8&%&%&&&%,)&\u009A&>&\u0086&7&]&F&2&>&J&6&n&2&%&?&\u008E&2&6&J&g&-&0&,&*&J&*&O&)&6&(&<&B&N&.&P&@&2&.&W&M&%\u053C\u0084(,(<&,&\u03DA&\u18C7&-&,(%&(&%&(\u013B0&X&D&\u0081&j&'&J&(&.&B&3&Z&R&h&3&E&E&<\u00C6-\u0360\u1EF3&%8?&@&,&Z&@&0&J&,&^&x&_&6&C&6&C\u072C\u2A25&f&-&-&-&-&,&J&2&8&z&8&C&Y&8&-&d&\u1E78\u00CC-&7&1&F&7&t&W&7&I&.&.&^&=\u0F9C\u19D3&8(>&/&/&\u077B')'\u1065')'%@/&0&%\u043E\u09C0*&*@&C\u053D\u05D4\u0274\u05EB4\u0DD7\u071A\u04D16\u0D84&/\u0178\u0303Z&*%\u0246\u03FF&\u0134&1\u00A8\u04B4\u0174";
Expand Down
8 changes: 4 additions & 4 deletions research/brotlidump.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class Enumerator(WithExtra):
extraTable is a class variable that contains
the extraBits of the symbols from 0
value0 contains the value of symbol 0
encodings is not neccessary, but allowed.
encodings is not necessary, but allowed.
Note: place for FixedCode to make sure extraBits works
"""
def __init__(self, name=None, **args):
Expand Down Expand Up @@ -592,7 +592,7 @@ def explanation(self, index, extra):
map(str, lengths[index:index+5]))
)

class TreeShapeAlhabet(BoolCode):
class TreeShapeAlphabet(BoolCode):
"""The bit used to indicate if four word code is "deep" or "wide"
"""
name = 'SHAPE'
Expand Down Expand Up @@ -1452,7 +1452,7 @@ def myMnemonic(index):
del alphabet.mnemonic
if numberOfSymbols==4:
#read tree shape to redefine lengths
lengths = self.verboseRead(TreeShapeAlhabet())
lengths = self.verboseRead(TreeShapeAlphabet())
#construct the alphabet prefix code
alphabet.setLength(dict(zip(table, lengths)))
return alphabet
Expand Down Expand Up @@ -1722,7 +1722,7 @@ def readLiteralContextModes(self):

def contextMap(self, kind):
"""Read context maps
Returns the number of differnt values on the context map
Returns the number of different values on the context map
(In other words, the number of prefix trees)
"""
NTREES = self.verboseRead(TypeCountAlphabet(
Expand Down
4 changes: 2 additions & 2 deletions research/draw_histogram.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ using gflags::ParseCommandLineFlags;
#include "third_party/absl/flags/flag.h"
#include "read_dist.h"

DEFINE_int32(height, 1000, "Height of the resulting histogam.");
DEFINE_int32(width, 8000, "Width of the resulting histogam.");
DEFINE_int32(height, 1000, "Height of the resulting histogram.");
DEFINE_int32(width, 8000, "Width of the resulting histogram.");
DEFINE_int32(size, 1e8, "Size of the compressed file.");
DEFINE_int32(brotli_window, -1, "Size of brotli window in bits.");
DEFINE_uint64(min_distance, 0, "Minimum distance.");
Expand Down