@thi.ng/bencode
Version:
Bencode binary encoder / decoder with optional UTF8 encoding & floating point support
13 lines • 449 B
TypeScript
/**
* Decodes given byte array back into JS data(structure).
*
* @remarks
* UTF-8 is used by default, but can be disabled by setting `utf8` to false. In
* that case, strings will be decoded as `Uint8Array`s, with the exception of
* dictionary keys, which will be decoded via `String.fromCharCode()`.
*
* @param buf
* @param utf8
*/
export declare const decode: (buf: Uint8Array, utf8?: boolean) => any;
//# sourceMappingURL=decode.d.ts.map