New Terminal Output:

root@f3f8d6319494:/app# python3 -c "
> import struct
>
> with open('/app/frames.tza', 'rb') as f:
>     f.read(4)
>     w, h = struct.unpack('<HH', f.read(4))
>     n_frames, max_bytes = struct.unpack('<II', f.read(8))
>
>     frames = []
>     for i in range(n_frames):
>         frames.append(f.read(w*h))
>
> # Count non-space chars in first frame
> non_space = sum(1 for b in frames[0] if b != 32)
> print(f'Non-space chars in frame 0: {non_space}')
>
> # Count line-level changes between consecutive frames
> for i in range(1, 6):
>     line_changes = 0
>     line_same = 0
>     for r in range(h):
>         prev_row = frames[i-1][r*w:(r+1)*w]
>         curr_row = frames[i][r*w:(r+1)*w]
>         if prev_row == curr_row:
>             line_same += 1
>         else:
>             line_changes += 1
>     print(f'Frame {i-1}->{i}: {line_changes} lines changed, {line_same} same')
> "
Non-space chars in frame 0: 901
Frame 0->1: 1 lines changed, 23 same
Frame 1->2: 1 lines changed, 23 same
Frame 2->3: 1 lines changed, 23 same
Frame 3->4: 11 lines changed, 13 same
Frame 4->5: 1 lines changed, 23 same
root@f3f8d6319494:/app#
