Git Product home page Git Product logo

xz.net's Introduction

XZ.NET

XZ.NET is a .NET wrapper for liblzma.dll

License

Licensed under MIT license. See LICENSE, AUTHORS.

This project uses a public domain compression library liblzma from XZ Utils and build tools for Windows (MinGW-w64), which were used by creators of XZ Utils. See LICENSE-Notices for information.

Description

The intentions of this library is to provide basic operations with .xz file format to .NET (C#, F#, VB) developers.

The library was tested with i686-sse2 and x86-64 version of liblzma 5.2.1 (these versions are included in project under names liblzma.dll and liblzma64.dll).

You can find some basic examples in 'Examples' folder of project.

ChangeLog

20/12/2016 - 2.0.0

  • Fixed x64 encoding/decoding
  • Removed separate x86/x64 build configurations
  • Exposed encoding options with more natural defaults
  • More robust error handling
  • Guard against buffer overflows
  • Drastically reduced memory churn (2x-4x faster depending on workload)
  • Single-call buffer encoding/decoding functions

09/09/2015 - 1.2.0

  • Compression part of library should work fine from now on

16/06/2015 - 1.1.0

  • Switched the license to MIT

11/05/2015

  • Added x86-64 liblzma support and conditional compilation

11/03/2015 What's new:

  • compressing data
  • retargeted to 2.0 framework and now using generics instead of LINQ
  • now using 5.2.1 version of liblzma

18/01/2015 - 1.0

Initial commit. Library can be used for:

  • getting uncompressed stream from .xz archive
  • getting the size of uncompressed file

Contact

Roman Belkov - [email protected]

Kirill Melentyev - [email protected]

xz.net's People

Contributors

goldenbull avatar pentp avatar philatwysdom avatar romanbelkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xz.net's Issues

XZOutputStream failes if preset is larger than 7

XZOutputStream throws an exception when its preset set to 8 or 9.
For detail, this exception is raised from XZOutputStream.cs line 83.

System.InsufficientMemoryException: 'Memory allocation failed'

It only happens if XZ.NET is using 32bit version of liblzma.dll, and it happens regardless of liblzma.dll's version (5.2.1 and 5.2.3 tested).

To reproduce, please use the test code from pull request #8 .

Tested Environment

  • Windows 10 x64 v1709
  • .Net Framework 4.7.1 installed
  • XZ.NET 2.0 trageting .Net Framework 4 Client Profile

Support compressing files bigger than 1MB?

  1. Uncomment "Simple compression (with timing)" part in Examples.cs; rebuild
  2. Copy & paste a big file into "XZ.NET\Examples\bin\Debug", rename it to "test.img"
  3. Run Examples.exe

Result: test.img.xz is generated, but only 1MB. Try to uncompress it using 7Zip, get Data error

image

Is MaxThreads limitation necessary?

class XZOutputStream has a constant value
private const int MaxThreads = 8;
I think the multi-thread config should be decided by user.
For example, I'm going to write some C# app using xz to archive some log files on a server which has 40 cores -- yes, a very powerful server, so I hope to use 32 threads to do the compression in parallel :)
In case when user has set an irrational number of threads, we can use Trace.TraceWarning to issue a warning message.

2.0.0 have not been published to Nuget

In nuget 1.2.2 is the lastest version of XZ.NET.
Is there any reason prevented upload of 2.0.0?

Many improvements like AnyCPU build were achieved in 2.0.0, so it would be better to let developers use lastest version of XZ.NET via nuget.

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.