Deflating Binary Data

Nonsanity form at nonsanity.com
Fri Feb 25 10:15:22 EST 2011


Well I'm having a conversation with myself here, but I can't seem to get the
decompress() function to work. it keeps giving me an unhelpful error:

Script compile error:
Error description: Object Name:

If I feed it binary data that came from compress(), it's fine and dandy. But
send it anything else and the script aborts with that error. You would think
it would return a helpful error value if the data was malformed in some way.
And it seems not to like the data I need to re-inflate.

 ~ Chris Innanen
 ~ Nonsanity


On Thu, Feb 24, 2011 at 4:08 PM, Nonsanity <form at nonsanity.com> wrote:

> Never thee mind... Google eventually pointed me to the correct command.
> Something the LiveCode Dictionary failed to do.
>
> decompress()
>
>  ~ Chris Innanen
>  ~ Nonsanity
>
>
>
> On Thu, Feb 24, 2011 at 3:54 PM, Nonsanity <form at nonsanity.com> wrote:
>
>> I've got a binary file I'm parsing in LiveCode, and it contains sections
>> that are compressed with the deflate compressor. This is the same format
>> revZip works with, except this isn't a group of files, it's just raw byes.
>>
>> Has anyone worked out a way previously to handle this in a multi-platform
>> way? I'm pretty sure I could pipe this data through the shell command - one
>> way or another - to have a command line gzip on Macs decompress it for me.
>> But I don't know of a way to do this on Windows that doesn't require an
>> additional install.
>>
>> Maybe there's some way to fool revZip into doing it for me? I'm not
>> against writing the data out to a temporary file, if that is necessary,
>> though it's best to avoid that sort of thing. It's already in memory, so
>> it's best to keep it there for the decode.
>>
>>
>>  ~ Chris Innanen
>>  ~ Nonsanity
>>
>>
>>
>



More information about the Use-livecode mailing list