[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.pack with bit resolution
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 16 Oct 2019 11:13:49 -0300
> Therefore could you please consider to allow the following extensions to the
> Ref manual spec "6.4.2-Format strings for pack":
Some of these options are already there:
> S0: a null-terminated String
This is option 'z'.
> S: a string, where the number field before specifies the string length (so
> that the string length can be specified also by a short number, e. g. 1 byte
> or so)
This is option 'sn', where 'n' is the number of bytes of the preceding
length (e.g., 's2' uses an unsigned short for the length).
> b3 24-bit number (signed, B3 would be unsigned)
> h3 48-bit number (signed, H3 would be unsigned)
These are options 'i3' and 'i6'.
-- Roberto