Skip to content
Snippets Groups Projects
Commit ff5dfbd0 authored by morkolai's avatar morkolai
Browse files

Merge branch 'compressor' of...

Merge branch 'compressor' of https://gitlab.stud.idi.ntnu.no/bachelor-paa-bittet/soitool into compressor
parents 165427c0 3a27c682
No related branches found
No related tags found
1 merge request!38#69 Komprimering og dekomprimering
......@@ -9,7 +9,7 @@ def compress(obj):
"""
Compress a json compatible object using the lzma algorithm.
JSON compapitle object are python types that are posible to convert to
JSON compatible object are python types that are possible to convert to
JSON types. Se overview in this link:
https://docs.python.org/3/library/json.html#py-to-json-table
......@@ -30,7 +30,7 @@ def compress(obj):
def decompress(lzma_compressed_json_string):
"""
Decompress a lzma compressed json string.
Decompress a lzma-compressed json string.
Decompresses a json compatible python object which is casted from bytes to
string.
......@@ -38,7 +38,7 @@ def decompress(lzma_compressed_json_string):
Parameters
----------
lzma_compressed_json_string : string
The string of the compressed object
The string of the lzma-compressed json string
Returns
-------
......@@ -46,7 +46,7 @@ def decompress(lzma_compressed_json_string):
One of these python objects:
https://docs.python.org/3/library/json.html#py-to-json-table
"""
# Removes extra b' notation
# Remove extra b' notation
lzma_compressed_json_string = lzma_compressed_json_string[2:-1].encode(
encoding="ascii"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment