Skip to content

Commit c27a91e

Browse files
Ahmed99125cclauss
andauthored
Update compression/lz78.py
Co-authored-by: Christian Clauss <[email protected]>
1 parent 676da50 commit c27a91e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compression/lz78.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def compress(self, text: str) -> list[Token]:
5959
>>> lz78_compressor.compress({})
6060
Traceback (most recent call last):
6161
TypeError: Expected string.
62-
>>> len("ababc") >= len(lz78_compressor.compress("ababc"))
62+
>>> all(len(s) >= len(lz78_compressor.compress(x)) for s in (
63+
... "", "AA", "AB", "AAA", "ABC", "ABCDEFGH"))
6364
True
6465
"""
6566

0 commit comments

Comments
 (0)