piker-alpha / lzvn Goto Github PK
View Code? Open in Web Editor NEWC-Style conversion of lzvn_decode
C-Style conversion of lzvn_decode
It looks like this implementation will not compress data < 7 bytes.
That's not a problem in itself, but does anyone know how Apple's HFS/APFS compression handles the case where the last chunk-to-be-compressed in a file is too small?
Hi,
Have you ever considered making this code cross-platform by hiding the kernel-related code behind #ifdefs?
I'd be interested in looking into that, but only if there's a real interest to this compression scheme in itself AND the assembly code doesn't do anything Mac-specific. What can you say about that?
Thanks,
R.B.
Output of the script, notice there's no "Writing data to:" when "prelinkedkernel" is part of the name of the unpacked file:
# ./lzvn -d ~/prelinkedkernel_el_capitan /usr/local/prelinkedkernel_el_capitan_unpacked
Filesize: 16220614 bytes
Prelinkedkernel found!
Checking adler32 ... OK (0xe4bbd94b)
Extracting kernel ...
10705272 bytes written
# ./lzvn -d ~/prelinkedkernel_el_capitan /usr/local/test_prelinkedkernel
Filesize: 16220614 bytes
Prelinkedkernel found!
Checking adler32 ... OK (0xe4bbd94b)
Extracting kernel ...
10705272 bytes written
# ./lzvn -d ~/prelinkedkernel_el_capitan /usr/local/prelinkedkerne
Filesize: 16220614 bytes
Prelinkedkernel found!
Checking adler32 ... OK (0xe4bbd94b)
Decoding prelinkedkernel ...
Writing data to: /usr/local/prelinkedkerne
44998656 bytes written
Im asking for a reverse process to extraction, is it possible?
In case LZVN_7,
compBufferPointer = length;
compBufferPointer -= negativeOffset; // sub %r12,%r8
if (compBufferPointer < negativeOffset) // jb Llzvn_exit
{
return 0;
}
The condition should probably be
if (length < negativeOffset)
since compBufferPointer has already been modified.
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.