Skip to content

Commit ce619fc

Browse files
committed
[DEBUG]
1 parent 57d7422 commit ce619fc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gempy/modules/serialization/save_load.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ def model_to_binary(model: GeoModel) -> bytes:
6868
compressed_binary_input = zlib.compress(model.structural_frame.input_tables_binary)
6969
compressed_binary_grid = zlib.compress(model.grid.grid_binary)
7070

71+
compressed_binary_grid = zlib.compress(model.grid.grid_binary, level=6)
72+
73+
import hashlib
74+
print("raw bytes hash:", hashlib.sha256(model.grid.grid_binary).hexdigest())
75+
print("compressed length:", len(compressed_binary_grid))
76+
print("zlib version:", zlib.ZLIB_VERSION)
77+
7178
# * Add here the serialization meta parameters like: len_bytes
7279
model.structural_frame._input_binary_size = len(compressed_binary_input)
7380
model.grid._grid_binary_size = len(compressed_binary_grid)

0 commit comments

Comments
 (0)