Date: prev next · Thread: first prev next last


Hi,

I'm trying to decode binary file which contains a list of strings. Each
string is prefixed by a number of bytes which specify the length of the
string (some may call this a 'Pascal' string)

If the string is shorter than 255 bytes, the length is stored in 8 bits. If
the string is in the range of 256 - 65533 bytes, the length information
consists of 8-bits (all ones) and a 16-bit number. And so on.... Here is a
small table I made... https://bin.snyman.info/mmm527r8

My first question is does this have a name? The second one is whats the
best way to parse this number?

Thanks in advance for any info you can give me.

Phill Ridout

-- 
To unsubscribe e-mail to: discuss+unsubscribe@documentliberation.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.documentliberation.org/www/discuss/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.