Git Product home page Git Product logo

lzvn's People

Contributors

piker-alpha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lzvn's Issues

Minimum size

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?

cross-platform version

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.

lzvn -d doesn't decode if output name contains "prelinkedkernel"

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

Case LZVN_7

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.