[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: struct.el -- a package to encode/decode binary data
From: |
Eli Zaretskii |
Subject: |
Re: struct.el -- a package to encode/decode binary data |
Date: |
Fri, 22 Mar 2002 13:04:11 +0200 |
> From: "Stefan Monnier" <monnier+gnu/address@hidden>
> Date: Thu, 21 Mar 2002 20:05:09 -0500
>
> > Most of them, those between 160 and 255 _are_ represented as a single
> > byte, even in a multibyte string/buffer. That's the eight-bit-graphic
> > character set.
>
> Interesting. It still means that binary values between 128 and 160
> (i.e. from eight-bit-control) are posing problems when calling `aset'.
Yes, that's true. So moving through a multibyte buffer/string with
binary data is slightly less efficient than with unibyte buffer/string
(assuming a uniform distribution of possible 8-bit values in the range
[0..255]). Moving *back* through such buffers/strings is especially
painful, since you cannot in advance find the head of the multibyte
sequence, which tells how many bytes to move to skip the character.
However, I think in code that constructs numbers from binary data you
don't normally need to move back, or use aset. You normally need to
move/scan forward a small number of bytes, while you accumulate their
values into a number. That should be reasonably efficient, and so
using unibyte strings doesn't seem to be justified.
- Re: struct.el -- a package to encode/decode binary data, (continued)
- Re: struct.el -- a package to encode/decode binary data, Kim F. Storm, 2002/03/19
- Re: struct.el -- a package to encode/decode binary data, Thien-Thi Nguyen, 2002/03/19
- Re: struct.el -- a package to encode/decode binary data, Richard Stallman, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Eli Zaretskii, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Kim F. Storm, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Eli Zaretskii, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Kim F. Storm, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Stefan Monnier, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Eli Zaretskii, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Stefan Monnier, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data,
Eli Zaretskii <=
- Re: struct.el -- a package to encode/decode binary data, Miles Bader, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Richard Stallman, 2002/03/22
- Re: struct.el -- a package to encode/decode binary data, Stefan Monnier, 2002/03/21
- Re: struct.el -- a package to encode/decode binary data, Richard Stallman, 2002/03/22
Re: struct.el -- a package to encode/decode binary data, Kenichi Handa, 2002/03/21
Re: struct.el -- a package to encode/decode binary data, Kenichi Handa, 2002/03/21