Deflating Binary Data

Nonsanity form at nonsanity.com
Fri Feb 25 14:35:40 EST 2011


I was actually modifying my deflate-ed data to give it a header that would
make it compatible - hopefully. I didn't have high hopes that that would
work, but I DID expect the decompress() function to NOT crash. I'd call that
a bug. The function shouldn't crash the script if it gets bad data - It
should report the error in the return value (or in "the result") and
continue on.

 ~ Chris Innanen
 ~ Nonsanity


On Fri, Feb 25, 2011 at 12:28 PM, J. Landman Gay
<jacque at hyperactivesw.com>wrote:

> On 2/25/11 9:15 AM, Nonsanity wrote:
>
>> 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.
>>
>
> Those two functions are for gzip only. You can't give it any other kind of
> data. RevZip and gzip are different.
>
> The error is probably blank because LiveCode doesn't know what went wrong
> exactly, only that it can't continue. That's actually an improvement over
> older behavior, where the error would default to the first line in the error
> list if there wasn't a match, giving incorrect info.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list