A Python package wrapping stormpci.h via PyBind11 for interfacing with StormPCI and reading binary files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
447 B

from stormpci_bin_reader import BlockReader
br = BlockReader("2022-04-23-00:00:37.bin", seek=0)
blocks = br.read_all_blocks()
# print(len(blocks))
for j, block in enumerate(blocks):
if j == 0:
# print(len(block.raw_data))
with open("test.bin", "wb") as f:
f.write(block.raw_data)
print(block)
# for tests run in bash:
# head -c 6344 2022-04-23-00\:00\:37.bin > test2.bin
# and
# diff test2.bin test.bin