File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
gempy/modules/serialization Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ def model_to_binary(model: GeoModel) -> bytes:
68
68
compressed_binary_input = zlib .compress (model .structural_frame .input_tables_binary )
69
69
compressed_binary_grid = zlib .compress (model .grid .grid_binary )
70
70
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
+
71
78
# * Add here the serialization meta parameters like: len_bytes
72
79
model .structural_frame ._input_binary_size = len (compressed_binary_input )
73
80
model .grid ._grid_binary_size = len (compressed_binary_grid )
You can’t perform that action at this time.
0 commit comments