[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.pack with bit resolution
- From: bil til <flyer31@...>
- Date: Sun, 20 Oct 2019 06:12:56 -0700 (MST)
Hi Philippe,
thank you for your answer.
But maybe there are some misunderstandings:
- Long double and int128 is all included... (int128 is i16, integer with 16
bytes...). Just please understand, that you would get REAL support of 128bit
integers (with "REAL" I mean also for unpack, also in lua_Number...) only in
some future LUA_128BIT (currently only LUA_64BIT and LUA_32BIT available, as
I see it, but it should not be any magic to extend to LUA_128BIT). What do
you mean with "all IEEE number types" - do you want longer numbers than
int128.
- variable-length length also included (see the N type byte ... codes
0x81...0xE8
- vectors are in lua lua_table - these are also included, see codes
0x40..0x42 (options 't' and 'T')
- Space separtors: These spaces are ONLY in the fomat string, to make the
format more readable. But NOT in the packed string of course. Please check
the option table for ' ', ',', ';', there it clearly says "(ignored)" ...
these separators of course do NOT penetrate into the packed string.
For "different encodings" - woud you plesae give some "typical" (=widely
used I hope) example?
What do you mean by "subtable backward reference"? can you give some
example?
... just please understand, that I clearly would NOT have the ambition to
create ZIP code by string.pack/unpack, this would really be a bit too much.
Besides ZIP code is EXTREMLY inefficient for smaller strings, it gets good
only after about 100...1000 bytes... . For small strings you better should
use some "small string compressing" things, but this needs to be done in
really special C code of course - this typically needs a strong usage of
tables... . You can find nice things to do this by googling for this... .
The last 2 paragrpahs of your answer (about "encoding downstream") I do not
really understand ... I assume that this is somehow linked to your zip
question ... but I really would have NOT the ambition to use string
compression here in any way... . If you to combine this with string
compression, this would be no problem, but it would need a separate command
before, e. g. strcompr= compressfunction(str), and then give strcompr to
your string.pack command, this is no problem... .
--
Sent from: http://lua.2524044.n2.nabble.com/Lua-l-f2524044.html
- References:
- string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, Roberto Ierusalimschy
- Re: string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, Sean Conner
- Re: string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, Sean Conner
- Re: string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, bil til
- Re: string.pack with bit resolution, Philippe Verdy