Hi.
I've looked around a bit, but I couldn't find a way to decompress an array of bytes.
The Zip and XAD plugins only allow, also the CompressFile/DecompressFile functions only work on files.
Am I missing something?
Cheers,
Manfred
decompress (zlib) bytes
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: decompress (zlib) bytes
Look into Virtual Files. It's just one extra step.
I'm on registered MorphOS using FlowStudio.
Re: decompress (zlib) bytes
Hmm, not bad.
That should work, thanks.
Manfred
That should work, thanks.
Manfred
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: decompress (zlib) bytes
Keep in mind that both CompressFile() and DecompressFile() use a custom format so for raw zlib compressed bytes you'd have to imitate this custom format. I think there is a "HWPK" identifier, then 4 reserved bytes, and then the raw zlib compressed bytes. So by composing your virtual file like this you should be able to decompress raw bytes with DecompressFile():
Code: Select all
f$ = "HWPK" .. "\0\0\0\0" .. rawbytes$
Re: decompress (zlib) bytes
Ah, OK, thanks for this pointer.
I was thinking that the virtual files also work with the ZIP or XAD plugin.
But if I don't need a plugin it's even better.
Manfred
I was thinking that the virtual files also work with the ZIP or XAD plugin.
But if I don't need a plugin it's even better.
Manfred