@isopodlabs/binary_libs 1.2.0 → 1.2.1

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/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Adrian Stephens
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # Binary Libs
2
+ [![npm version](https://img.shields.io/npm/v/@isopodlabs/binary_libs.svg)](https://www.npmjs.com/package/@isopodlabs/binary_libs)
3
+ [![GitHub stars](https://img.shields.io/github/stars/adrianstephens/binary_libs.svg?style=social)](https://github.com/adrianstephens/binary_libs)
4
+ [![License](https://img.shields.io/npm/l/@isopodlabs/binary_libs.svg)](LICENSE.txt)
2
5
 
3
6
  This package provides readers for various library formats, using the @isopodlabs/binary binary file loading library
4
7
 
5
8
  ## ☕ Support My Work
6
- If you use this package, consider [buying me a tea](https://coff.ee/adrianstephens) to support future updates!
9
+ If you use this package, consider [buying me a cup of tea](https://coff.ee/adrianstephens) to support future updates!
7
10
 
8
11
  ## Supported File Types
9
12
 
@@ -148,7 +148,7 @@ const COLOUR = {
148
148
  RED: 0, BLACK: 1
149
149
  };
150
150
  class DirEntry extends binary.Class({
151
- name: binary.StringType(64, 'utf16le'),
151
+ name: binary.StringType(32, 'utf16le'),
152
152
  name_size: binary.UINT16_LE,
153
153
  type: binary.UINT8,
154
154
  colour: binary.UINT8,
@@ -0,0 +1,26 @@
1
+ import * as binary from '@isopodlabs/binary';
2
+ declare const Decimal_base: (new (s: binary._stream) => {
3
+ reserved: number;
4
+ scale: number;
5
+ sign: number;
6
+ mhi: number;
7
+ mlo: bigint;
8
+ } & {
9
+ write(w: binary._stream): void;
10
+ }) & {
11
+ get: <X extends abstract new (...args: any) => any>(this: X, s: binary._stream) => InstanceType<X>;
12
+ put: (s: binary._stream, v: any) => void;
13
+ };
14
+ export declare class Decimal extends Decimal_base {
15
+ toNumber(): number;
16
+ }
17
+ export declare const CV_MMASK = 1792;
18
+ export declare const CV_TMASK = 240;
19
+ export declare const CV_SMASK = 15;
20
+ export declare const CV_MSHIFT = 8;
21
+ export declare const CV_TSHIFT = 4;
22
+ export declare const CV_SSHIFT = 0;
23
+ export declare function CV_MODE(typ: number): number;
24
+ export declare function CV_TYPE(typ: number): number;
25
+ export declare function CV_SUBT(typ: number): number;
26
+ export {};