interface LayoutConstructor { new (): Layout; new (span?: T, property?: P): Layout; readonly prototype: Layout; } interface Layout { span: number; property?: P; decode(b: Buffer, offset?: number): T; encode(src: T, b: Buffer, offset?: number): number; getSpan(b: Buffer, offset?: number): number; replicate(name: AP): Layout; } declare const Layout: LayoutConstructor; interface StructureConstructor { new (): Structure; new (fields: T, property?: P, decodePrefixes?: boolean): Structure; } interface Structure extends Layout { span: number; decode(b: Buffer, offset?: number): DecodeSchema; layoutFor(property: AP): Layout; offsetOf(property: AP): number; } declare const Structure: StructureConstructor; interface UnionConstructor { new (): Union; new (discr: Layout, defaultLayout: Layout, property?: string): Union; } interface Union extends Layout { registry: object; decode(b: Buffer, offset?: number): Partial; addVariant(variant: number, layout: Structure> | Layout, property?: string): any; } declare const Union: UnionConstructor; interface BitStructureConstructor { new (...params: any[]): BitStructure; } declare type BitStructure = Layout; declare const BitStructure: BitStructureConstructor; interface UIntConstructor { new (span?: T, property?: P): UInt; } declare type UInt = Layout; declare const UInt: UIntConstructor; interface BlobConstructor { new (...params: ConstructorParameters): Blob; } declare type Blob

= Layout; declare const Blob: BlobConstructor; declare const greedy:

(elementSpan?: number, property?: P | undefined) => Layout; declare const u8:

(property?: P | undefined) => Layout; declare const u16:

(property?: P | undefined) => Layout; declare const u24:

(property?: P | undefined) => Layout; declare const u32:

(property?: P | undefined) => Layout; declare const u40:

(property?: P | undefined) => Layout; declare const u48:

(property?: P | undefined) => Layout; declare const nu64:

(property?: P | undefined) => Layout; declare const u16be:

(property?: P | undefined) => Layout; declare const u24be:

(property?: P | undefined) => Layout; declare const u32be:

(property?: P | undefined) => Layout; declare const u40be:

(property?: P | undefined) => Layout; declare const u48be:

(property?: P | undefined) => Layout; declare const nu64be:

(property?: P | undefined) => Layout; declare const s8:

(property?: P | undefined) => Layout; declare const s16:

(property?: P | undefined) => Layout; declare const s24:

(property?: P | undefined) => Layout; declare const s32:

(property?: P | undefined) => Layout; declare const s40:

(property?: P | undefined) => Layout; declare const s48:

(property?: P | undefined) => Layout; declare const ns64:

(property?: P | undefined) => Layout; declare const s16be:

(property?: P | undefined) => Layout; declare const s24be:

(property?: P | undefined) => Layout; declare const s32be:

(property?: P | undefined) => Layout; declare const s40be:

(property?: P | undefined) => Layout; declare const s48be:

(property?: P | undefined) => Layout; declare const ns64be:

(property?: P | undefined) => Layout; declare const f32:

(property?: P | undefined) => Layout; declare const f32be:

(property?: P | undefined) => Layout; declare const f64:

(property?: P | undefined) => Layout; declare const f64be:

(property?: P | undefined) => Layout; declare const struct: (fields: T, property?: P | undefined, decodePrefixes?: boolean) => T extends Layout[] ? Structure, "">]: Extract> extends Layout ? V : any; }> : any; declare const seq: (elementLayout: Layout, count: number | Layout, property?: P | undefined) => Layout; declare const union: (discr: Layout, defaultLayout?: any, property?: string) => Union; declare const unionLayoutDiscriminator:

(layout: Layout, property?: P | undefined) => any; declare const blob:

(length: number | Layout, property?: P | undefined) => Blob

; declare const cstr:

(property?: P | undefined) => Layout; declare const utf8:

(maxSpan: number, property?: P | undefined) => Layout; declare const bits: (word: Layout, msb?: boolean, property?: P | undefined) => BitStructure; declare const offset: (layout: Layout, offset?: number, property?: P | undefined) => Layout; declare type GetStructureSchema = T extends Structure ? S : unknown; export { BitStructure, Blob, GetStructureSchema, Layout, LayoutConstructor, Structure, UInt, Union, bits, blob, cstr, f32, f32be, f64, f64be, greedy, ns64, ns64be, nu64, nu64be, offset, s16, s16be, s24, s24be, s32, s32be, s40, s40be, s48, s48be, s8, seq, struct, u16, u16be, u24, u24be, u32, u32be, u40, u40be, u48, u48be, u8, union, unionLayoutDiscriminator, utf8 };