Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fkm_nbt/utils/BinaryReader.ts>default

Node: https://www.npmjs.com/package/fkm-nbt Deno: https://deno.land/x/fkm_nbt
Latest
class default
import { default } from "https://deno.land/x/fkm_nbt@v0.1.0/utils/BinaryReader.ts";

Constructors

new
default(buffer: Uint8Array, littleEndian?: boolean)

Properties

private
buffer: Uint8Array
private
cursor: number
private
optional
littleEndian: boolean
private
textDecoder: TextDecoder
private
view: DataView

Methods

private
getStringStorage(type:
| "int16"
| "uint16"
| "int32"
| "uint32"
): number
getOffset(): number
readByte(): number
readDouble(littleEndian?: boolean): number
readFloat(littleEndian?: boolean): number
readFloat32BE(): number
readFloat32LE(): number
readFloat64BE(): number
readFloat64LE(): number
readFully(bytes: number[]): void
readInt(littleEndian?: boolean): number
readInt16BE(): number
readInt16LE(): number
readInt32BE(): number
readInt32LE(): number
readInt64BE(): bigint
readInt64LE(): bigint
readInt8(): number
readLong(littleEndian?: boolean): bigint
readShort(littleEndian?: boolean): number
readString(storage?:
| "int16"
| "uint16"
| "int32"
| "uint32"
): string
readUByte(): number
readUCS2(storage?:
| "int16"
| "uint16"
| "int32"
| "uint32"
): string
readUInt(littleEndian?: boolean): number
readUInt16BE(): number
readUInt16LE(): number
readUInt32BE(): number
readUInt32LE(): number
readUInt64BE(): bigint
readUInt64LE(): bigint
readULong(littleEndian?: boolean): bigint
readUShort(littleEndian?: boolean): number
readUTF8(storage?:
| "int16"
| "uint16"
| "int32"
| "uint32"
): string
readVarInt(): number
setOffset(offset: number): void
skipBytes(n: number): void