Skip to content

Commit

Permalink
Use .gz file instead of .hex
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkiss committed Jun 30, 2022
1 parent d0b9b81 commit 46c7e22
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clvm/serialize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# decoding:
# read a byte
# if it's 0x80, it's nil (which might be same as 0)
# if it's 0xfe, it's a back-reference. Read an atom, and treat it as a path to the cache tree.
# if it's 0xfe, it's a back-reference. Read an atom, and treat it as a path in the cache tree.
# if it's 0xff, it's a cons box. Read two items, build cons
# otherwise, number of leading set bits is length in bytes to read size
# For example, if the bit fields of the first byte read are:
Expand Down
Binary file added tests/generator.bin.gz
Binary file not shown.
1 change: 0 additions & 1 deletion tests/generator.hex

This file was deleted.

3 changes: 2 additions & 1 deletion tests/serialize_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gzip
import io
import unittest

Expand Down Expand Up @@ -182,7 +183,7 @@ def test_deserialize_large_blob(self):
sexp_buffer_from_stream(InfiniteStream(bytes_in))

def test_deserialize_generator(self):
blob = bytes.fromhex(open("tests/generator.hex").read())
blob = gzip.GzipFile("tests/generator.bin.gz").read()
s = sexp_from_stream(io.BytesIO(blob), to_sexp_f)
b = self.check_serde(s)
assert len(b) == 19124
Expand Down

0 comments on commit 46c7e22

Please sign in to comment.