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