Skip to content

Commit

Permalink
Fixed --compress message.
Browse files Browse the repository at this point in the history
  • Loading branch information
CalderWhite committed Jan 4, 2020
1 parent f2476d5 commit 8a6cf09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ optional arguments:
-h, --help show this help message and exit
--key KEY If given a key, AES will be used to encrypt/decrypt the message
body.
--compress If supplied, a pre computed huffman table will be used to
compress the message body. NOTE: This will not always result in
positive compression since the huffman table is pre computed.
--compress If supplied, a pre computed smaz will be used to compress the
body. NOTE: This is only effective with language, and binary
data is best left uncompressed
```

## Known Bugs
Expand Down
9 changes: 5 additions & 4 deletions gif_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,9 @@ def main(args):
parser.add_argument("--key", type=str, default=None,
help="If given a key, AES will be used to encrypt/decrypt the message body.")
parser.add_argument("--compress", const=True, action="store_const",
help="If supplied, a pre computed"
" huffman table will be used to compress the message body."
" NOTE: This will not always result in positive compression"
" since the huffman table is pre computed.")
help="If supplied, a pre computed smaz will be used to"
" compress the body. NOTE: This is only effective with"
" language, and binary data is best left uncompressed")

args = parser.parse_args()

Expand All @@ -206,6 +205,8 @@ def main(args):
else:
body = args.body

print(len(body))

if use_crypto:
body = encrypt_AES(body, args.key)
else:
Expand Down

0 comments on commit 8a6cf09

Please sign in to comment.