On 17/03/2015 02:10 am, Peter Gutmann wrote:
David Shaw <dshaw(_at_)jabberwocky(_dot_)com> writes:
On Mar 16, 2015, at 5:15 PM, David Leon Gil <coruus(_at_)gmail(_dot_)com> wrote:
Partial lengths are really a nuisance to parse.
No argument there...
The whole bizarro sort-of-fixed-point encoding of lengths is a pain (this is a
cue for Jon to do his "every bit is sacred" dance). If the format is revised,
there should be only two lengths, a 16-bit one for almost everything (keyring
data, signatures, etc), and a 32-bit one for payloads and partial lengths that
are going to exceed 16-bit lengths.
Crazy * 2 :)
One int is good enough for anyone. Just use an expanding 7 bit form,
where the hi bit says, grab the following byte.
Length-decoding shouldn't be any more
if( tag & length_32_flag )
length = read32();
length = read16();
While I'm venting, shall I get started on the MDC kludge?
openpgp mailing list