@andrew_l/tl-pack 0.3.22 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/BinaryReader.d.mts +481 -0
- package/dist/_chunks/BinaryReader.d.mts.map +1 -0
- package/dist/_chunks/BinaryReader.mjs +1300 -0
- package/dist/_chunks/BinaryReader.mjs.map +1 -0
- package/dist/index.d.mts +3 -6
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +14 -21
- package/dist/index.mjs.map +1 -1
- package/dist/stream.d.mts +13 -15
- package/dist/stream.d.mts.map +1 -0
- package/dist/stream.mjs +61 -68
- package/dist/stream.mjs.map +1 -1
- package/package.json +10 -9
- package/dist/index.cjs +0 -38
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -29
- package/dist/index.d.ts +0 -29
- package/dist/shared/tl-pack.5CF-VZgL.cjs +0 -1663
- package/dist/shared/tl-pack.5CF-VZgL.cjs.map +0 -1
- package/dist/shared/tl-pack.B8uBXdlJ.mjs +0 -1651
- package/dist/shared/tl-pack.B8uBXdlJ.mjs.map +0 -1
- package/dist/shared/tl-pack.DM1wAuup.d.cts +0 -482
- package/dist/shared/tl-pack.DM1wAuup.d.mts +0 -482
- package/dist/shared/tl-pack.DM1wAuup.d.ts +0 -482
- package/dist/stream.cjs +0 -72
- package/dist/stream.cjs.map +0 -1
- package/dist/stream.d.cts +0 -21
- package/dist/stream.d.ts +0 -21
package/dist/index.d.cts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { B as BinaryWriterOptions, a as BinaryReaderOptions } from './shared/tl-pack.DM1wAuup.cjs';
|
|
2
|
-
export { b as BinaryReader, c as BinaryWriter, C as CORE_TYPES, D as DecodeHandler, f as DefineStructureOptions, E as EncodeHandler, M as MAX_BUFFER_SIZE, S as Structure, T as TLExtension, d as createDictionary, e as createExtension, g as defineStructure } from './shared/tl-pack.DM1wAuup.cjs';
|
|
3
|
-
import '@andrew_l/toolkit';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Encode any value into `Uint8Array`
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const buffer = tlEncode(new Date(0));
|
|
10
|
-
*
|
|
11
|
-
* console.log(buffer); // Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0])
|
|
12
|
-
*
|
|
13
|
-
* @group Main
|
|
14
|
-
*/
|
|
15
|
-
declare function tlEncode(value: unknown, opts?: BinaryWriterOptions): Uint8Array;
|
|
16
|
-
/**
|
|
17
|
-
* Decode value from `Uint8Array`
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* const buffer = new Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
21
|
-
* const value = tlDecode(buffer);
|
|
22
|
-
*
|
|
23
|
-
* console.log(value); // Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
|
|
24
|
-
*
|
|
25
|
-
* @group Main
|
|
26
|
-
*/
|
|
27
|
-
declare function tlDecode<T = any>(buffer: Uint8Array, opts?: BinaryReaderOptions): T;
|
|
28
|
-
|
|
29
|
-
export { BinaryReaderOptions, BinaryWriterOptions, tlDecode, tlEncode };
|
package/dist/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { B as BinaryWriterOptions, a as BinaryReaderOptions } from './shared/tl-pack.DM1wAuup.js';
|
|
2
|
-
export { b as BinaryReader, c as BinaryWriter, C as CORE_TYPES, D as DecodeHandler, f as DefineStructureOptions, E as EncodeHandler, M as MAX_BUFFER_SIZE, S as Structure, T as TLExtension, d as createDictionary, e as createExtension, g as defineStructure } from './shared/tl-pack.DM1wAuup.js';
|
|
3
|
-
import '@andrew_l/toolkit';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Encode any value into `Uint8Array`
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const buffer = tlEncode(new Date(0));
|
|
10
|
-
*
|
|
11
|
-
* console.log(buffer); // Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0])
|
|
12
|
-
*
|
|
13
|
-
* @group Main
|
|
14
|
-
*/
|
|
15
|
-
declare function tlEncode(value: unknown, opts?: BinaryWriterOptions): Uint8Array;
|
|
16
|
-
/**
|
|
17
|
-
* Decode value from `Uint8Array`
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* const buffer = new Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
21
|
-
* const value = tlDecode(buffer);
|
|
22
|
-
*
|
|
23
|
-
* console.log(value); // Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
|
|
24
|
-
*
|
|
25
|
-
* @group Main
|
|
26
|
-
*/
|
|
27
|
-
declare function tlDecode<T = any>(buffer: Uint8Array, opts?: BinaryReaderOptions): T;
|
|
28
|
-
|
|
29
|
-
export { BinaryReaderOptions, BinaryWriterOptions, tlDecode, tlEncode };
|