From 0bc6e4312cad0f997751739e750954ac39dfa6cc Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Mon, 27 Sep 2021 09:06:50 -0700 Subject: [PATCH] Move collections into collect space --- bidict.py => collect/bidict.py | 0 trie.py => collect/trie.py | 0 letter_compress.py | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) rename bidict.py => collect/bidict.py (100%) rename trie.py => collect/trie.py (100%) diff --git a/bidict.py b/collect/bidict.py similarity index 100% rename from bidict.py rename to collect/bidict.py diff --git a/trie.py b/collect/trie.py similarity index 100% rename from trie.py rename to 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' """ -- 2.47.1