![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@4bitlabs/codecs
Advanced tools
@4bitlabs/codecs
A collection of decoders (and eventually encoders) for working with Sierra On-line SCI-engine assets.
Name | Decoder | Encoder |
---|---|---|
Huffman | ✅ | |
Lempel–Ziv–Welch | ✅ |
Decoding bytes with Huffman:
import { Huffman } from '@4bitlabs/codecs';
const encodedBytes = Uint8Array.of(/* encoded data */);
const bytes = Huffman.decode(encodedBytes);
Decoding bytes with Lempel-Ziv-Welch:
import { Lzw } from '@4bitlabs/codecs';
const encodedBytes = Uint8Array.of(/* encoded data */);
const bytes = Lzw.decode(encodedBytes);
By default, most-significant bit ordering is used. You can change the encoded byte ordering of the decoder with the options
parameter. To use least-significant bit
ordering:
const bytes = Lzw.decode(encodedBytes, { order: 'lsb' });
The default code-width it uses is 8
, this can also be adjusted. To use a 7-bit code width:
const bytes = Lzw.decode(encodedBytes, { literalWidth: 7 });
Also, an entirely custom LZW dictionaries can be used for decoding:
import { Lzw } from '@4bitlabs/codecs';
const dictionary = [
Lzw.EOF_MARKER,
0x41, // A
0x42, // B
0x43, // C
0x44, // D
];
const bytes = Lzw.decode(encodedBytes, { dictionary });
Longer codings can be encoded in the dictionary by using either an array of numbers of with a Uint8Array
:
import { Lzw, EOF_MARKER } from '@4bitlabs/codecs';
const dictionary = [
Lzw.EOF_MARKER,
Uint8Array.of(0x47, 0x41, 0x54, 0x41), // GATA
Uint8Array.of(0x41, 0x54, 0x54, 0x41), // ATTA
Uint8Array.of(0x43, 0x47, 0x41, 0x54), // CGAT
Uint8Array.of(0x41, 0x43, 0x41, 0x47), // ACAG
];
const bytes = Lzw.decode(encodedBytes, { dictionary });
FAQs
A collection of codecs for working with SCI-engine assets
The npm package @4bitlabs/codecs receives a total of 10 weekly downloads. As such, @4bitlabs/codecs popularity was classified as not popular.
We found that @4bitlabs/codecs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.