GithubHelp home page GithubHelp logo

yumeyao / lz4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lz4/lz4

0.0 0.0 1.0 5.48 MB

lz4 with multi thread support

Home Page: https://github.com/yumeyao/lz4/pull/1

License: Other

Makefile 5.83% CMake 0.86% C 84.05% Python 3.91% C++ 2.09% Shell 0.50% Roff 0.93% Meson 1.76% Dockerfile 0.07%

lz4's People

Contributors

bimbashrestha avatar bioothod avatar blezsan avatar chocobo1 avatar cmeister2 avatar cyan4973 avatar dcolascione avatar felixhandte avatar gabrielstedman avatar gsauthof avatar inikep avatar irwand avatar jpetermugaas avatar kou avatar kylejharper avatar ldv-alt avatar lpsantil avatar mgorny avatar nh2 avatar nrgiii avatar remittor avatar svpv avatar sylvestre avatar t-mat avatar terrelln avatar test4973 avatar tesuji avatar tzakian avatar vtorri avatar yumeyao avatar

Forkers

oscargame

lz4's Issues

block dependent

maybe still we can use current model with 1 thread, so that I/O can be done in a separate thread with input prefetched.

or, divide the block_num of input evenly into N threads, then each thread compress the input into a stream containing continous blocks. then combine multiple streams together (skippable streams? compatibility issues?)

Document build instructions

Is your feature request related to a problem? Please describe.
I managed to get this to build on macOS14 (ARM) after some wrangling and it does work! It's faster than single threaded version, well done :)

Would be great to document how to build better.

These are the commands to build that worked:

export CXXFLAGS="-std=c++11"
make clean ENABLE_MT=yes
make  ENABLE_MT=yes
sudo make uninstall ENABLE_MT=yes
sudo make install ENABLE_MT=yes

But only after creating an endian.h file at the following location:

sudo mkdir /usr/local/include
sudo vim /usr/local/include/endian.h

with the following content:

#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1

/** compatibility header for endian.h
 * This is a simple compatibility shim to convert
 * BSD/Linux endian macros to the Mac OS X equivalents.
 * It is public domain.
 * */

#ifndef __APPLE__
    #warning "This header file (endian.h) is MacOS X specific.\n"
#endif  /* __APPLE__ */


#include <libkern/OSByteOrder.h>

#define htobe16(x) OSSwapHostToBigInt16(x)
#define htole16(x) OSSwapHostToLittleInt16(x)
#define be16toh(x) OSSwapBigToHostInt16(x)
#define le16toh(x) OSSwapLittleToHostInt16(x)

#define htobe32(x) OSSwapHostToBigInt32(x)
#define htole32(x) OSSwapHostToLittleInt32(x)
#define be32toh(x) OSSwapBigToHostInt32(x)
#define le32toh(x) OSSwapLittleToHostInt32(x)

#define htobe64(x) OSSwapHostToBigInt64(x)
#define htole64(x) OSSwapHostToLittleInt64(x)
#define be64toh(x) OSSwapBigToHostInt64(x)
#define le64toh(x) OSSwapLittleToHostInt64(x)


#endif  /* __FINK_ENDIANDEV_PKG_ENDIAN_H__ */

(e.g. from https://gist.github.com/yinyin/2027912)

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.