| Class | BufferCursor |
| In: |
lib/innodb/util/buffer_cursor.rb
|
| Parent: | Object |
A cursor to walk through data structures to read fields. The cursor can move forwards, backwards, is seekable, and supports peeking without moving the cursor. The BinData module is used for interpreting bytes as desired.
| VERSION | = | "0.9.0" |
Read an InnoDB-compressed unsigned 32-bit integer (1-5 bytes).
The first byte makes up part of the value stored as well as indicating the number of bytes stored, maximally an additional 4 bytes after the flag for integers >= 0xf0000000.
Optionally accept a flag (first byte) if it has already been read (as is the case in get_imc_uint64).
Read an InnoDB-compressed unsigned 64-bit integer (5-9 bytes).
The high 32 bits are stored as an InnoDB-compressed unsigned 32-bit integer (1-5 bytes) while the low 32 bits are stored as a standard big-endian 32-bit integer (4 bytes). This makes a combined size of between 5 and 9 bytes.
Read an InnoDB-"much compressed" unsigned 64-bit integer (1-11 bytes).
If the first byte is 0xff, this indicates that the high 32 bits are stored immediately afterwards as an InnoDB-compressed 32-bit unsigned integer. If it is any other value it represents the first byte (which is also a flag) of the low 32 bits of the value, also as an InnoDB- compressed 32-bit unsigned integer. This makes for a combined size of between 1 and 11 bytes.