Skip to main content
Module

x/byte_type/mod.ts>UnsizedType

😋 A small helper module for working with different raw types in javascript
Go to Latest
class UnsizedType
implements Unsized<T>
Re-export
Abstract
import { UnsizedType } from "https://deno.land/x/byte_type@0.3.0/mod.ts";

Constructors

new
UnsizedType(byteAlignment: number)

Methods

protected
alignOffset(options: Options)
protected
incrementOffset(options: Options, byteSize: number)
read(dt: DataView, options?: Options): T

In most cases you don't need to reimplement read. as long as your readPacked is correct

abstract
readPacked(dt: DataView, options?: Options): T
write(
value: T,
options?: Options,
): void

In most cases you don't need to reimplement write. as long as your writePacked is correct

abstract
writePacked(
value: T,
options?: Options,
): void