Giter Club home page Giter Club logo

ocaml-lz4's People

Contributors

c-cube avatar etiennecallies avatar kit-ty-kate avatar whitequark avatar yallop 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ocaml-lz4's Issues

Compression increases filesize

I don't know if this is maintained anymore, but I'll try anyway.

    let lines =  load_big_file file in
    Printf.printf "%S\n" (string_of_int (Bigarray.Array1.dim lines));
    let compressed_content = LZ4.Bigbytes.compress(lines) in
        Printf.printf "%S\n" (string_of_int (Bigarray.Array1.dim compressed_content));
        write compressed_content "file.ext";

Gives me:

"523283080"
"524743149"

I assume I did something wrong, as there is no such issue reported here. I pass a Bigarray to the compression function. I tested several files, yet not a single one decreases in size.

OPAM release

The README says

        The bindings are available via OPAM:

            $ opam install lz4

but the bindings aren't available in the central repository, at least.

doesn't compile on freebsd

cf.
https://travis-ci.org/github/ocaml/opam-repository/jobs/713590305

#=== ERROR while compiling lz4.1.1.1 ==========================================#

# context     2.0.6 | freebsd/x86_64 | ocaml-base-compiler.4.09.1 | file:///usr/home/travis/build/ocaml/opam-repository

# path        /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/.opam-switch/build/lz4.1.1.1

# command     /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/bin/ocaml setup.ml -build

# exit-code   1

# env-file    /usr/home/travis/.opam/log/lz4-8809-f44153.env

# output-file /usr/home/travis/.opam/log/lz4-8809-f44153.out

### output ###

# [...]

# + /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/bin/ocamlopt.opt unix.cmxa -I /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/lib/ocamlbuild /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/lib/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/home/travis/.opam/ocaml-base-compiler.4.09.1/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild

# File "myocamlbuild.ml", line 518, characters 43-62:

# 518 |                        List.map (fun m -> (String.uncapitalize m) ^ ".cmi")

#                                                  ^^^^^^^^^^^^^^^^^^^

# Alert deprecated: Ocamlbuild_plugin.String.uncapitalize

# Use String.uncapitalize_ascii instead.

# File "myocamlbuild.ml", line 531, characters 51-70:

# 531 |                        List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi")

#                                                          ^^^^^^^^^^^^^^^^^^^

# Alert deprecated: Ocamlbuild_plugin.String.uncapitalize

# Use String.uncapitalize_ascii instead.

# E: Failure("Command ''/usr/home/travis/.opam/ocaml-base-compiler.4.09.1/bin/ocamlbuild' lib_gen/LZ4_bindgen.byte lib/liblz4_stubs.a lib/dlllz4_stubs.so lib/lz4.cma lib/lz4.cmxa lib/lz4.a lib/lz4.cmxs -tag debug' terminated with error code 10")

decompress always create a 'storage'

this is bad for performance (you always allocate). Users should be allowed to pass a buffer, with an offset in it and a maximum size to use in it.

Doesn't build using PKGSRC package manager.

I tried building the library on a NetBSD system (which uses PKGSRC for its 3rd-party package installer.) All packages installed by this manager are placed in /usr/pkg/*. The build fails because it can't find lz4.h (since it's not looking in /usr/pkg/include.) The build would also have to find and specify the library in /usr/pkg/lib.

How do we add a search path? I didn't see a config-lz4 in OPAM.

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.