Skip to content
forked from wrren/xz.ex

XZ utility library wrapper for Elixir.

Notifications You must be signed in to change notification settings

skygroup2/xz.ex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XZ

Hex.pm

Elixir NIF wrapper for the XZ/LZMA data compression function library. Presents a very simple interface for compressing and decompressing data using default options for now.

Examples

iex> input = "Hello World"
"Hello World"
iex> {:ok, compressed} = XZ.compress input
{:ok,
 <<253, 55, 122, 88, 90, 0, 0, 4, 230, 214, 180, 70, 2, 0, 33, 1, 22, 0, 0, 0,
   116, 47, 229, 163, 1, 0, 10, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108,
   100, 0, 0, 198, 205, 181, 199, 103, 116, 116, 62, ...>>}
iex> {:ok, decompressed} = XZ.decompress compressed
{:ok, "Hello World"}

Installation

If available in Hex, the package can be installed by adding xz to your list of dependencies in mix.exs:

def deps do
  [
    {:xz, "~> 0.1.0"}
  ]
end

xz requires that liblzma be installed on your system prior to being built. xz does not currently support Windows.

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/lzma.

About

XZ utility library wrapper for Elixir.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 48.4%
  • Elixir 47.5%
  • Makefile 4.1%