@evasuo/uo-huffman-code
v1.1.0
Published
This is a typescript template that contains the typescript configuration for most of our projects.
Downloads
11
Readme
@evasuo/huffman-code
Javascript Huffman Code Compression & Decompression for Ultima Online
Supports
- ✅ Node
- ✅️ Browser
Example Usage
Compress
/**
* At times, when preparing to send a packet to the UO client
* it will need to be compressed.
*/
import {Compress} from '@evasuo/uo-huffman-code';
Compress.Process(UODataPacketBuffer);
Decompress
/**
* The UO server will start encrypting packages after selecing a server.
* This will allow you to decompress those packets.
*/
import {Deompress} from '@evasuo/uo-huffman-code';
Decompress.Process(UODataPacketBuffer, 0, UODataPacketBuffer.length);