tsolomko / SWCompression

A Swift framework for working with compression, archives and containers.
MIT License
237 stars 41 forks source link

Strange .tbz seemingly only gets its first block extracted #59

Open mihelm opened 3 weeks ago

mihelm commented 3 weeks ago

Hi

I've stumbled upon a very strange .tbz archive:

https://macromates.com

For some reason, BZip2.decompress(data: data) only spits out the first block (at least I think that's what's happening, since the "decompressed" data comes out at 900 KB). Naturally, TarContainer can't do anything with that.

Archive Utility can open the downloaded file. And when I create a .tbz from the expanded app with no funny settings, the resulting archive works just fine with BZip2.decompress(data: data) — and my archive is even a little smaller than the offered download.

I have no idea what they did there. Maybe an interesting edge case to play around with...

Cheers, michael.