(len: number)
| 218 | } |
| 219 | |
| 220 | stringUtf16LE(len: number) { |
| 221 | if (len < 0 || len > this.byteLength - this.cursor) { |
| 222 | throw new Error("Insufficient bytes for UTF-16LE string"); |
| 223 | } |
| 224 | if ((len & 1) !== 0) { |
| 225 | throw new Error("UTF-16LE string length must be even"); |
| 226 | } |
| 227 | const result = this.platformBuffer.toString( |
| 228 | "utf16le", |
| 229 | this.cursor, |
| 230 | this.cursor + len, |
| 231 | ); |
| 232 | this.cursor += len; |
| 233 | return result; |
| 234 | } |
| 235 | |
| 236 | stringWithHeader() { |
| 237 | const header = this.readVarUint36Small(); |
no test coverage detected