nauful / nlzm Goto Github PK
View Code? Open in Web Editor NEWDictionary compressor with nibbled ANS and optimal parsing
Dictionary compressor with nibbled ANS and optimal parsing
It's a bug:
Line 2073 in dec9d34
You access memory before buffer start and anyway you can't meaningfully address 256-byte block before you computed hash of entire 256 bytes
Header includes hist_bits and frame_bits. Both size is 2bytes. but both range is smaller than 32. And frame_bits is generated by Clamp(hist_bits - 2, 14U, 17U).
So header should be 1byte for hist_bits.
The ERROR message
nl.cpp: In function ‘void RANS::init_cdf(int16 (&)[num_syms])’:
nl.cpp:255:19: error: ‘scale_bits’ was not declared in this scope
cdf[i] = (i << scale_bits) / num_syms;
^~~~~~~~~~
nl.cpp:255:19: note: suggested alternative: ‘scale_max’
cdf[i] = (i << scale_bits) / num_syms;
^~~~~~~~~~
scale_max
nl.cpp: In function ‘uint32 crc32_calc(const byte*, int64, uint64)’:
nl.cpp:3318:24: error: cast from ‘const byte*’ {aka ‘const unsigned char*’} to ‘byte’ {aka ‘unsigned char’} loses precision [-fpermissive]
while (n && (byte(next) & 15)) {
^
I removed init_cdf
and replaced next
with *next
for it to work.
Also it would be nice if you didn't use windows only stuff like #include <intrin.h>
.
There are possibly other windows only stuff.
I crosscompiled it to windows and the run it using wine in linux.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.