Coder Social home page Coder Social logo

Comments (2)

specke avatar specke commented on May 27, 2024 1

In fact, there is another way to improve the format, which will be almost compatible with the existing format. The pseudo-code would look as follows:
if (len == low) {
len += byte1;
if (len <= 255)
// same as before, +1 byte for lengths low..255
else if (len == 256)
// same as before, +3 bytes for lengths up to 65535
else
// we used +2 bytes for lengths 256..511
// however, we can use (len-256)*256 + byte2 which will make use of all currently unused values.
}

In fact Z80 decompressors are already compatible with this format change. However, current decompressors for 8088 and 6502 are not compatible. Our current plan is to modify decompressors for this change and introduce the change at the compressor level together with the next minor version update. Or the one after. We do not want to rush it, esp. since the change in the compression ratio is basically negligible.

from lzsa.

specke avatar specke commented on May 27, 2024

Hi da0ka, yes, this is a small inefficiency in the format, which was introduced to save on an extra operation in the decompressor. I.e. it is a performance optimization. Since the compressor itself is nearly optimal, it very well compensates for this inefficiency, literally losing 2 or 3 bytes per file usually.

from lzsa.

Related Issues (19)

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.