Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synodriver/lua-huffman
huffman encode and decode for lua
https://github.com/synodriver/lua-huffman
huffman lua
Last synced: 18 days ago
JSON representation
huffman encode and decode for lua
- Host: GitHub
- URL: https://github.com/synodriver/lua-huffman
- Owner: synodriver
- Created: 2022-07-01T12:51:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-02T02:56:54.000Z (over 2 years ago)
- Last Synced: 2024-10-11T11:26:33.220Z (about 1 month ago)
- Topics: huffman, lua
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
✨ lua-huffman ✨
The lua binding for huffman
### huffman compress and decompress for lua
- usage
```
hfm = require("hfm")data = "1234"
for i = 1, 10 do
data = data .. data
end
print("origin len : " .. #data)
encoded = hfm.encode(data)
print("encoded len : " .. #encoded)
print(hfm.decode(encoded))hfm.encode_file("Makefile", "Makefile.bin")
hfm.decode_file("Makefile.bin", "Makefile.txt")
```