Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Add LZ4 support #18

Open
1 of 8 tasks
leandor opened this issue Nov 5, 2016 · 1 comment
Open
1 of 8 tasks

Add LZ4 support #18

leandor opened this issue Nov 5, 2016 · 1 comment
Assignees
Labels
enhancement Request to add or enhance a feature.
Milestone

Comments

@leandor
Copy link
Contributor

leandor commented Nov 5, 2016

(see original discussion here too -> wrye-bash/wrye-bash#338)

The official lz4 is here: https://github.com/lz4/lz4

TODO

  • Incorporate dependence on LZ4 distribution
  • (1) Wrap simple functions from the library into python functions
  • Add python tests for simple functions in (1)
  • (2) Next step is to wrap archive support functions
  • Add python tests for (2)
  • (3) Implement high level interface supporting python idioms and primitives based on the simple wrappers on (1) & (2)
  • Add tests for functionality on (3)
  • Documentation
leandor added a commit that referenced this issue Nov 5, 2016
Added dependency to GSL for coding safer low level C++ when
interacting with the raw lz4 API.
leandor added a commit that referenced this issue Nov 5, 2016
That way each translation unit that defines a module can have the same
private declaration and the linker won't complain.
leandor added a commit that referenced this issue Nov 5, 2016
Started definition of internal redirection functions under
namespace lz4::api that have a safer interface in general by using
constructs taken from the CPP guidelines.
leandor added a commit that referenced this issue Nov 5, 2016
Added definition of pybind sub-module for containing the lz4
encapsulation.
leandor added a commit that referenced this issue Nov 5, 2016
Test runner through CMake was broken because it still looked for the
old test1.py files.
leandor added a commit that referenced this issue Nov 5, 2016
Changed test_imports.py to try to import submodule lz4
leandor added a commit that referenced this issue Nov 5, 2016
Moved the implementation from the `api.cpp` to the header `api.h` to
allow for using constexpr for re-declaring constants, and to allow for
inlining when useful.
leandor added a commit that referenced this issue Nov 5, 2016
Published the `versionNumber` function as `lz4.version()` and added a
test case for checking if it's working.
leandor added a commit that referenced this issue Nov 5, 2016
Published a `version` function that returns the version as a tuple
leandor added a commit that referenced this issue Nov 5, 2016
Moved a bunch of inline function to a separate `api_impl.h` header to
avoid polluting too much the main header.
leandor added a commit that referenced this issue Nov 5, 2016
Added a VERSION_STRING() function that gives the version string in
the standard format.
leandor added a commit that referenced this issue Nov 5, 2016
As it's the file that will be defining the main api.
leandor added a commit that referenced this issue Nov 5, 2016
Published compress_default function as a simple python
implementation, and added a test to see if it works.
leandor added a commit that referenced this issue Nov 5, 2016
Source buffers should be const and point to const content.
@leandor leandor added enhancement Request to add or enhance a feature. goal Long term goal. May be code-related or a meta goal. papi Issue is primarily related to the Python API. labels Nov 5, 2016
@Utumno
Copy link
Member

Utumno commented Nov 5, 2016

Thanks @leandor !

I really just need to decompress (save headers for SSE and bsas/b2as not sure what :P)

I guess this now depends on CBash 7 integration ?

EDIT: I first saw this and then the other (more noisy) issue - wrye-bash/wrye-bash#338

@leandor leandor self-assigned this Nov 5, 2016
leandor added a commit that referenced this issue Nov 6, 2016
Source buffers should be const and point to const content.
leandor added a commit that referenced this issue Nov 6, 2016
Since they just redirect internal constants, no need for them to be
part of the internal "hidden" API.
leandor added a commit that referenced this issue Nov 6, 2016
Functions used are in the base namespace.
leandor added a commit that referenced this issue Nov 6, 2016
`compress` was implemented inlined as a lambda in the module
initialization.

Since it wasn't a "trivial" implementation, I think it's better for it
to be a "real" function.
leandor added a commit that referenced this issue Nov 6, 2016
Moved the initialization block that has the `lz4` module declarations
to a new `main.cpp` file that will only contain the delarations, since
the actual implementations remain in `module.cpp`.
leandor added a commit that referenced this issue Nov 6, 2016
leandor added a commit that referenced this issue Nov 6, 2016
Included boost::format for generating formatted strings in the
exception messages.
leandor added a commit that referenced this issue Nov 6, 2016
Published basic decompress() function. Next in the line is to publish
the actual functions that are needed for compression/decompression
support of files.
leandor added a commit that referenced this issue Jul 1, 2017
Started definition of internal redirection functions under
namespace lz4::api that have a safer interface in general by using
constructs taken from the CPP guidelines.
leandor added a commit that referenced this issue Jul 1, 2017
Added definition of pybind sub-module for containing the lz4
encapsulation.
leandor added a commit that referenced this issue Jul 1, 2017
Test runner through CMake was broken because it still looked for the
old test1.py files.
leandor added a commit that referenced this issue Jul 1, 2017
Changed test_imports.py to try to import submodule lz4
leandor added a commit that referenced this issue Jul 1, 2017
Moved the implementation from the `api.cpp` to the header `api.h` to
allow for using constexpr for re-declaring constants, and to allow for
inlining when useful.
leandor added a commit that referenced this issue Jul 1, 2017
Published the `versionNumber` function as `lz4.version()` and added a
test case for checking if it's working.
leandor added a commit that referenced this issue Jul 1, 2017
Published a `version` function that returns the version as a tuple
leandor added a commit that referenced this issue Jul 1, 2017
Moved a bunch of inline function to a separate `api_impl.h` header to
avoid polluting too much the main header.
leandor added a commit that referenced this issue Jul 1, 2017
Added a VERSION_STRING() function that gives the version string in
the standard format.
leandor added a commit that referenced this issue Jul 1, 2017
As it's the file that will be defining the main api.
leandor added a commit that referenced this issue Jul 1, 2017
Published compress_default function as a simple python
implementation, and added a test to see if it works.
leandor added a commit that referenced this issue Jul 1, 2017
Source buffers should be const and point to const content.
leandor added a commit that referenced this issue Jul 1, 2017
Source buffers should be const and point to const content.
leandor added a commit that referenced this issue Jul 1, 2017
Since they just redirect internal constants, no need for them to be
part of the internal "hidden" API.
leandor added a commit that referenced this issue Jul 1, 2017
Functions used are in the base namespace.
leandor added a commit that referenced this issue Jul 1, 2017
`compress` was implemented inlined as a lambda in the module
initialization.

Since it wasn't a "trivial" implementation, I think it's better for it
to be a "real" function.
leandor added a commit that referenced this issue Jul 1, 2017
Moved the initialization block that has the `lz4` module declarations
to a new `main.cpp` file that will only contain the delarations, since
the actual implementations remain in `module.cpp`.
leandor added a commit that referenced this issue Jul 1, 2017
leandor added a commit that referenced this issue Jul 1, 2017
Included boost::format for generating formatted strings in the
exception messages.
leandor added a commit that referenced this issue Jul 1, 2017
Published basic decompress() function. Next in the line is to publish
the actual functions that are needed for compression/decompression
support of files.
leandor added a commit that referenced this issue Jul 1, 2017
leandor added a commit that referenced this issue Jul 1, 2017
Added a new fixture for using data files on test cases that
require generating/validating execution against 'model' data.
leandor added a commit that referenced this issue Jul 1, 2017
Added new data files generated by the tool LZ4.exe as model for
checking  the function implementation.

As they are now, the tests don't pass because the tool writes the
output  data with a specific format generated by the 'frame'
functions, instead of the simple ones that I was publishing.
leandor added a commit that referenced this issue Jul 1, 2017
Test case for the decompress function.
leandor added a commit that referenced this issue Jul 1, 2017
Data files used for testing the high compression mode.
leandor added a commit that referenced this issue Jul 1, 2017
This is the API that is required to compress/decompress files as the
LZ4.exe tool does.
@Infernio Infernio added this to the 0.8.0 milestone Sep 20, 2019
@Infernio Infernio removed papi Issue is primarily related to the Python API. goal Long term goal. May be code-related or a meta goal. labels Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Request to add or enhance a feature.
Projects
None yet
Development

No branches or pull requests

3 participants