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 | |
| parent | 37d09d6ac30c8c66477149b7c73139c3e6782468 (diff) | |
Move collections into collect space
| -rw-r--r-- | collect/bidict.py (renamed from bidict.py) | 0 | ||||
| -rw-r--r-- | collect/trie.py (renamed from trie.py) | 0 | ||||
| -rw-r--r-- | letter_compress.py | 8 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bidict.py b/collect/bidict.py index 5ba3fc3..5ba3fc3 100644 --- a/bidict.py +++ b/collect/bidict.py diff --git a/trie.py b/collect/trie.py index b9a5a1a..b9a5a1a 100644 --- a/trie.py +++ b/collect/trie.py 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' """ |
