diff --git a/bam/cli.py b/bam/cli.py index 53f2ac7..a2f5ca4 100755 --- a/bam/cli.py +++ b/bam/cli.py @@ -653,15 +653,21 @@ class bam_commands: import struct ID_MESSAGE = 1 ID_PAYLOAD = 2 - ID_PAYLOAD_EMPTY = 3 - ID_DONE = 4 + ID_PAYLOAD_APPEND = 3 + ID_PAYLOAD_EMPTY = 4 + ID_DONE = 5 head = r.raw.read(4) if head != b'BAM\0': fatal("bad header from server") file_index = 0 + is_header_read = True while True: - msg_type, msg_size = struct.unpack("= 0) + + yield struct.pack('