tar
Version:
tar for JavaScript
21 lines • 1.24 kB
TypeScript
/** True for a `Uint8Array`, and for a subclass such as `Buffer`. */
export declare const isUint8Array: (x: unknown) => x is Uint8Array;
/** True for an `ArrayBuffer`. */
export declare const isArrayBuffer: (x: unknown) => x is ArrayBuffer;
/** True for an object that has the size and the stream of a `Blob`. */
export declare const isBlob: (x: unknown) => x is Blob;
/** True for an object that has the reader of a `ReadableStream`. */
export declare const isReadableStream: (x: unknown) => x is ReadableStream<Uint8Array>;
/** The number of bytes in the UTF-8 form of the string. */
export declare const utf8Length: (str: string) => number;
/** Decode the bytes from `start` to `end` as UTF-8. */
export declare const decodeUtf8: (buf: Uint8Array, start?: number, end?: number) => string;
/**
* Write the string as UTF-8 into `size` bytes at `off`. Fill the bytes
* that are left with zeros. A character that does not fit completely
* is not written.
*/
export declare const encodeUtf8Into: (str: string, buf: Uint8Array, off: number, size: number) => void;
/** Write a string of ASCII characters at `off`. */
export declare const writeAscii: (str: string, buf: Uint8Array, off: number) => void;
//# sourceMappingURL=bytes.d.ts.map