Off by one error with page size
This commit is contained in:
parent
91269d5100
commit
3e1f5da28e
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ def _get_page_data(compressor: ZstdCompressor, page_size: int, items: list[T]):
|
|||
num_fitting, serialised_data = _trim_items_to_page(compressor, page_size, items)
|
||||
|
||||
compressed_data = compressor.compress(json.dumps(items[:num_fitting]).encode('utf8'))
|
||||
assert len(compressed_data) < page_size, "The data shouldn't get bigger"
|
||||
assert len(compressed_data) <= page_size, "The data shouldn't get bigger"
|
||||
return _pad_to_page_size(compressed_data, page_size)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue