Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dezinater authored Dec 31, 2023
1 parent 15a74cd commit a7c32aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ The package comes with Typescript definitions so if you are using Typescript you
The original [Rust.World SDK](https://github.com/Facepunch/Rust.World) and the game itself uses LZ4 compression for map reading and writing. They use a library called [lz4net](https://github.com/MiloszKrajewski/lz4net) which is now outdated and has a custom implementation of LZ4. RustWorldJS recreates and uses that same custom implementation of LZ4.
This custom LZ4 format is a header for LZ4 data which means any LZ4 library can be used to read and write Rust maps if it can read and write the header. To recreate this custom LZ4 format in another language take a look at [LZ4Reader.ts](https://github.com/Dezinater/RustWorldJS/blob/master/src/LZ4Reader.ts#L52) and [worker.cts](https://github.com/Dezinater/RustWorldJS/blob/master/src/worker.cts#L30) for an example on how the header is used.
This custom LZ4 format is a header for LZ4 data which means any LZ4 library can be used to read and write Rust maps if it can read and write the header. To recreate this custom LZ4 format in another language take a look at [LZ4Reader.js](https://github.com/Dezinater/RustWorldJS/blob/master/src/LZ4Reader.js#L67) and [worker.cjs](https://github.com/Dezinater/RustWorldJS/blob/master/src/worker.cjs#L29) for an example on how the header is used.
The LZ4 library used in RustWorldJS is [lz4js](https://github.com/Benzinga/lz4js) but modified to use a hashing method from [lz4net](https://github.com/MiloszKrajewski/lz4net)
The LZ4 library used in RustWorldJS is [lz4js](https://github.com/Benzinga/lz4js) but modified to use a hashing method from [lz4net](https://github.com/MiloszKrajewski/lz4net)

0 comments on commit a7c32aa

Please sign in to comment.