Giter Site home page Giter Site logo

Comments (3)

bettio avatar bettio commented on May 20, 2024 3

I would like adding support for miniz when loading BEAM files on ESP32 (or maybe other platforms with miniz).
If add miniz support (on platforms without a default zlib) for modules loading, we can use the REPL for copying&pasting new modules and loading them at runtime.
I also agree about adding support to miniz/zlib for general data inflate / deflate.

from atomvm.

fadushin avatar fadushin commented on May 20, 2024 1

Currently, zlib de/compression is only used in AtomVM when loading BEAM files, either by the (c-based) PackBEAM tool or in the (degenerate) case where a BEAM file is loaded on the command line on UNIX systems. zlib compression is currently not used (needed?) on ESP32 or other platforms, though I don’t know if platforms other than ESP32 benefit from mmap’ing decompressed literals, as ESP32 does.

That being said, the ERTS zlib interface may be worth implementing as a general API for all platforms, so this could definitely be useful, if/when someone decides to contribute such an API/implementation. Compression could also be useful internally, for example, in the ETS MVP (Issue #887).

from atomvm.

bettio avatar bettio commented on May 20, 2024 1

This might be a useful snippet that I used on a different project, that might be a good starting point:

tinfl_decompressor decomp;
tinfl_init(&decomp);


tinfl_status decomp_status = tinfl_decompress(&decomp, source, &source_size, dest, dest, &uncompressed_size, TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
if (decomp_status != TINFL_STATUS_DONE) {
    return decomp_status;
}

from atomvm.

Related Issues (20)

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.