Skip to content

Commit

Permalink
chore: fix typos in strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogdham committed Jun 17, 2024
1 parent fb8efdd commit f820a4c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ Advanced parameters

.. py:attribute:: targetCBlockSize
Attempts to fit compressed block size into approximatively targetCBlockSize (in bytes). Note that it's not a guarantee, just a convergence target.
Attempts to fit compressed block size into approximately targetCBlockSize (in bytes). Note that it's not a guarantee, just a convergence target.

This is helpful in low bandwidth streaming environments to improve end-to-end latency, when a client can make use of partial documents.

Expand Down
2 changes: 1 addition & 1 deletion src/bin_ext/pyzstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ get_frame_size(PyObject *module, PyObject *args)
}

PyDoc_STRVAR(_get_frame_info_doc,
"Internal function, get zstd frame infomation from a frame header.");
"Internal function, get zstd frame information from a frame header.");

static PyObject *
_get_frame_info(PyObject *module, PyObject *args)
Expand Down
2 changes: 1 addition & 1 deletion src/bin_ext/pyzstd.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ typedef struct {
/* Thread lock for generating ZSTD_CDict/ZSTD_DDict */
PyThread_type_lock lock;

/* Reuseable compress/decompress dictionary, they are created once and
/* Reusable compress/decompress dictionary, they are created once and
can be shared by multiple threads concurrently, since its usage is
read-only.
c_dicts is a dict, int(compressionLevel):PyCapsule(ZSTD_CDict*) */
Expand Down
2 changes: 1 addition & 1 deletion src/c/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
['decompressed_size', 'dictionary_id'])

def get_frame_info(frame_buffer):
"""Get zstd frame infomation from a frame header.
"""Get zstd frame information from a frame header.
Parameter
frame_buffer: A bytes-like object. It should starts from the beginning of
Expand Down
10 changes: 5 additions & 5 deletions tests/test_zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1715,8 +1715,8 @@ def test_endless_1(self):
with self.assertRaises(ZstdError):
d.decompress(self.FRAME_42 + self.TRAIL)

self.assertTrue(d.at_frame_edge) # resetted
self.assertTrue(d.needs_input) # resetted
self.assertTrue(d.at_frame_edge) # has been reset
self.assertTrue(d.needs_input) # has been reset

# 2 frames, a
d = EndlessZstdDecompressor()
Expand Down Expand Up @@ -2104,7 +2104,7 @@ def test_finalize_dict_c(self):
with self.assertRaises(ValueError):
_zstd._finalize_dict(TRAINED_DICT.dict_content, b'', [], 0, 5)

def test_train_buffer_protocal_samples(self):
def test_train_buffer_protocol_samples(self):
def _nbytes(dat):
if isinstance(dat, (bytes, bytearray)):
return len(dat)
Expand Down Expand Up @@ -2379,9 +2379,9 @@ def test_known_size(self):
# 2 frame, the second frame's decompressed size is unknown
for extra in [-1, 0, 1]:
SIZE2 = self.BLOCK_SIZE[1] + self.BLOCK_SIZE[2] + extra
unkown_size = self.compress_unknown_size(SIZE2)
unknown_size = self.compress_unknown_size(SIZE2)

dat = decompress(known_size + unkown_size)
dat = decompress(known_size + unknown_size)
self.assertEqual(len(dat), SIZE1 + SIZE2)

# def test_large_output(self):
Expand Down

0 comments on commit f820a4c

Please sign in to comment.