Changes between Version 1 and Version 2 of VectorStreams


Ignore:
Timestamp:
Mar 22, 2010, 5:07:38 PM (9 years ago)
Author:
gb
Comment:

integer encoding/decoding functions use fixed-length fields, not LEB128

Legend:

Unmodified
Added
Removed
Modified
  • VectorStreams

    v1 v2  
    4545
    4646[Function][[BR]]
    47 '''UNSIGNED-INTEGER-TO-BINARY''' `value s`
     47'''UNSIGNED-INTEGER-TO-BINARY''' `value len s`
    4848
    49 Encodes the integer VALUE, which should be non-negative, on the VECTOR-OUTPUT-STREAM S using ULEB128.
     49Encodes the least significant (* LEN 8) bits of the integer VALUE in LEN big-endian bytes on the VECTOR-OUTPUT-STREAM S.
     50
    5051
    5152[Function][[BR]]
    52 '''SIGNED-INTEGER-TO-BINARY''' `value s`
     53'''SIGNED-INTEGER-TO-BINARY''' `value len s`
    5354
    54 Encodes the integer VALUE on the VECTOR-OUTPUT-STREAM S. Negative integers are encoded in SLEB128 and non-negative integers in ULEB128.
     55Encodes the integer VALUE in LEN big-endian bytes on the VECTOR-OUTPUT-STREAM S.
    5556
    5657[Function][[BR]]
    5758'''PARSE-UNSIGNED-INTEGER''' `vector &optional (start 0) end`
    5859
    59 Decodes a ULEB128-encoded integer from the bounded range of VECTOR,
    60 which must be of type (VECTOR (UNSIGNED-BYTE 8)). Returns two
    61 values: that integer and the the index of the first octet in VECTOR
    62 that follows the encoded integer. (The second value will be > start
    63 and <= end)
     60Decodes a big-endian-encoded unsigned integer from the bounded range of VECTOR,
     61which must be of type (VECTOR (UNSIGNED-BYTE 8)).
    6462
    6563[Function][[BR]]
    6664'''PARSE-SIGNED-INTEGER''' `vector &optional (start 0) end`
    6765
    68 As PARSE-UNSIGNED-INTEGER, but assumes SLEB128 encoding and may return
    69 a negative first value.
     66As PARSE-UNSIGNED-INTEGER, but interprets the bytes as encoding a signed integer and may return
     67a negative value.
    7068
    7169[Function][[BR]]
    72 '''PUI-STREAM''' `s`
     70'''PUI-STREAM''' `s count`
    7371
    74 Decodes a ULEB128-encoded integer from the VECTOR-INPUT-STREAM S and
     72Decodes an unsigned integer encoded in COUNT bytes of big-endian data from the VECTOR-INPUT-STREAM S and
    7573returns that value.
    7674
    7775[Function][[BR]]
    78 '''PSI-STREAM''' `s`
     76'''PSI-STREAM''' `s count`
    7977
    80 Decodes an SLEB128-encoded integer from the VECTOR-INPUT-STREAM S and
     78
     79Decodes a signed integer encoded in COUNT bytes of big-endian data from the VECTOR-INPUT-STREAM S and
    8180returns that value.
    8281
     82