diff options
| author | Scott Gasch <[email protected]> | 2021-09-27 09:06:50 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-09-27 09:06:50 -0700 |
| commit | 0bc6e4312cad0f997751739e750954ac39dfa6cc (patch) | |
| tree | d82dacb5d2878f3c9d5878734ad5700dc63e47b6 /letter_compress.py | |
| parent | 37d09d6ac30c8c66477149b7c73139c3e6782468 (diff) | |
Move collections into collect space
Diffstat (limited to 'letter_compress.py')
| -rw-r--r-- | letter_compress.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/letter_compress.py b/letter_compress.py index 01d40f9..4374edd 100644 --- a/letter_compress.py +++ b/letter_compress.py @@ -2,10 +2,10 @@ import bitstring -import bidict +from collect.bidict import bidict -special_characters = bidict.bidict( +special_characters = bidict( { ' ': 27, '.': 28, @@ -24,7 +24,7 @@ def compress(uncompressed: str) -> bytes: >>> import binascii >>> binascii.hexlify(compress('this is a test')) - b'99d12d225a06a6494c' + b'a2133da67b0ee859d0' """ compressed = bitstring.BitArray() @@ -47,7 +47,7 @@ def decompress(kompressed: bytes) -> str: its original form. >>> import binascii - >>> decompress(binascii.unhexlify(b'99d12d225a06a6494c')) + >>> decompress(binascii.unhexlify(b'a2133da67b0ee859d0')) 'this is a test' """ |
