Read an (offset, len) arena string; undefined when absent.
(arena: Buffer, row: Buffer, at: number)
| 37 | |
| 38 | /** Read an (offset, len) arena string; undefined when absent. */ |
| 39 | function str(arena: Buffer, row: Buffer, at: number): string | undefined { |
| 40 | const off = row.readUInt32LE(at); |
| 41 | if (off === NONE) return undefined; |
| 42 | const len = row.readUInt32LE(at + 4); |
| 43 | return arena.toString('utf8', off, off + len); |
| 44 | } |
| 45 | |
| 46 | /** NUL-joined list field; undefined when absent. */ |
| 47 | function strList(arena: Buffer, row: Buffer, at: number): string[] | undefined { |
no outgoing calls
no test coverage detected