Giter VIP home page Giter VIP logo

Comments (4)

milesgranger avatar milesgranger commented on June 12, 2024

Initially, I'm thinking this is interesting for a separate project (hashing as to cramjam's compression orientation), however just from glancing at xxhash briefly, I'm not sure it fits into the scope/genre of cramjam.

I'm also a bit confused how python's lz4 relates to xxhash? (at least for how you get it) Scanning the docs I don't see any API for it. Is it python's lz4 ships the xxhash C lib w/ it?

Anyhow, I think getting a xxhash impl going and running on pyodide should be pretty okay just don't have the free time available for it. On the off chance you've got some funding available, I'd be happy to do this under a contract agreement. (feel free to email me if this is the case and we can go from there) Otherwise I may do something much later when time is more present. :)

from cramjam.

jpivarski avatar jpivarski commented on June 12, 2024

The reason that I'm interested is because we have a file format that always precedes an LZ4-compressed block of data with an xxhash checksum, so LZ4 and xxhash are linked as dependencies: if we need LZ4, then we need xxhash.

https://github.com/scikit-hep/uproot5/blob/0f323c093448cc739d80b5a50dc08c9873cd35ff/src/uproot/compression.py#L425-L441

I'm not entirely sure why xxhash is linked to LZ4 specifically—maybe the other compressors have built-in checksums and LZ4 doesn't, so xxhash arbitrarily chosen to fill that gap? When I saw that the C implementation (not Python) of liblz4 has a header file called xxhash, I thought that explained the connection: these two algorithms have a common origin, but they've been packaged separately in Python.

Another avenue I can try is to see if the Python xxhash library can get added to Pyodide. Maybe it's easier for xxhash to add a meta.yaml build script to Pyodide than for you to port the C code of the xxhash algorithm to Rust? From the perspective of a dependent library that wants to run on JupyterLite, either would work for me, and now that I'm talking myself into it, it sounds like adding a build target is easier than porting an algorithm between languages with sufficient testing.

from cramjam.

jpivarski avatar jpivarski commented on June 12, 2024

To cross-link these, here's the request I made at python-xxhash: ifduyue/python-xxhash#65

from cramjam.

milesgranger avatar milesgranger commented on June 12, 2024

I agree, adding to python-xxhash would be the most beneficial. Anyway thanks for the additional context and information. Closing this as I think it's out of scope for cramjam.

from cramjam.

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.