I was trying to integrate changes in this repo into our mono-repo and luckily we had a test that caught this.
I added a test that repros the issue (fails w/out the changes to real code) and then added the fix. This was a regression introduced in #8 (right here).
In retrospect, the size encoding of the last frame should probably have been -sz-1 instead of just -sz. I think I convinced myself that it wasn't necessary because the last frame would never be empty. Oops.
I was trying to integrate changes in this repo into our mono-repo and luckily we had a test that caught this.
I added a test that repros the issue (fails w/out the changes to real code) and then added the fix. This was a regression introduced in #8 (right here).