• Stars
    star
    6
  • Rank 2,460,810 (Top 50 %)
  • Language
    Ada
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ada binding for liblzma compression library

Ada LZMA Library Binding

Build Status License GitLab Download

This is a small Ada05 library binding for the liblzma library.

About liblzma

liblzma is a public domain general-purpose data compression library with a zlib-like API.

liblzma is part of XZ Utils https://tukaani.org/xz/. XZ Utils includes a gzip-like command line tool named xz and some other tools. XZ Utils is developed and maintained by Lasse Collin.

Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK https://7-zip.org/sdk.html.

Building ada-lzma

Before you build the package you must install the liblzma library. The installation of liblzma depends on your system:

System Install with
Ubuntu & Debian sudo apt-get install liblzma-dev
Fedora sudo yum install xz-devel
NetBSD pre installed (contrib/xz)
FreeBSD pre installed (contrib/xz)
Windows See https://tukaani.org/xz/
Source See https://tukaani.org/xz/

Build with the following commands:

./configure
make

Installation

The installation is done with gprinstall if the configure script found it or by traditional copy. In all cases, you should install with the next command:

make install

How to use Ada LZMA

Two examples are provided to illustrate how to use the library. Look at these examples for the details on how to use some of the operations.

samples/compress_easy.adb is an example on how to compress some stream. samples/decompress.adb shows hoz to decompress a stream.

Roughly speaking, import some package:

with Lzma.Base;
with Lzma.Container;
with Lzma.Check;

Then declare the LZMA stream:

Stream  : aliased Lzma.Base.lzma_stream := Lzma.Base.LZMA_STREAM_INIT;

Initialize the LZMA stream as decoder (or as encoder):

Result := Lzma.Container.lzma_stream_decoder (Stream'Unchecked_Access,
                                              Long_Long_Integer'Last,
                                              Lzma.Container.LZMA_CONCATENATED);

Setup the stream 'next_out', 'avail_out', 'next_in' and 'avail_in' and call the lzma_code operation with the action (Lzma.Base.LZMA_RUN or Lzma.Base.LZMA_FINISH):

Result := Lzma.Base.lzma_code (Stream'Unchecked_Access, Action);

Close the LZMA stream:

Lzma.Base.lzma_end (Stream'Unchecked_Access);

More Repositories

1

ada-awa

Ada Web Application - Framework to build high performance secure web applications
Ada
90
star
2

ada-util

Ada Utility Library - Composing streams, processes, logs, serialization, encoders and more
Ada
68
star
3

ada-keystore

Ada Keystore - protect your sensitive data with secure storage
Ada
31
star
4

sql-benchmark

Tool to make SQL benchmark on different drivers, languages and databases
Ada
29
star
5

swagger-ada

Ada support for OpenAPI code generator
Ada
25
star
6

ada-ado

Ada Database Objects
Ada
24
star
7

ada-security

Ada Security - OAuth 2.0 client and server framework to secure web applications
Ada
22
star
8

ada-wiki

Ada Wiki Engine - Wiki parser and renderer with several Wiki syntaxes
Ada
19
star
9

ada-enet

Ada Embedded Network Stack
Ada
19
star
10

etherscope

Ethernet traffic monitor on a STM32F746 board
Ada
17
star
11

dynamo

Dynamo Ada Application Code Generator
Ada
17
star
12

ada-asf

Ada Server Faces - Web Server Faces JSR 252, JSR 314 and JSR 344
Ada
12
star
13

resource-embedder

ARE - Advanced Resource Embedder include files, scripts, images in Ada, C, Go binaries
Ada
10
star
14

ada-search

Ada
9
star
15

ada-bfd

Ada BFD is an Ada binding for the GNU Binutils BFD library. It allows to read binary ELF, COFF files by using the GNU BFD.
Ada
8
star
16

swagger-ada-todo

Simple todo list server with OpenAPI
Ada
8
star
17

ada-el

Ada EL - Expression Language Library (JSR245)
Ada
7
star
18

atlas

AWA Demonstrator
TSQL
7
star
19

ada-servlet

Ada Servlet - Web Servlet Library following JSR 154, JSR 315
Ada
7
star
20

mat

Memory Analysis Tool
Ada
6
star
21

ada-css

Ada parser for CSS files with CSS Object Model API
Ada
5
star
22

ada-stemmer

Multi natural language stemmer with Snowball generator
Ada
4
star
23

stm32-ui

STM32 UI library and tools
Ada
4
star
24

ada-rest-api-server-benchmark

Benchmark for REST api on Ada servers
Ada
3
star
25

jason

Project and ticket management
Ada
3
star
26

wi2wic

Wiki 2 Wiki Converter
Ada
2
star
27

hestia

Heat Controller
Ada
2
star
28

ada-mail

Mail tools
Ada
2
star
29

ada-libsecret

Ada Binding for the libsecret library
Ada
2
star
30

bbox-ada-api

Ada Binding for the Bbox API
Ada
2
star
31

babel

Babel Backup
Ada
1
star
32

ada-awe

Automatically exported from code.google.com/p/ada-awe
Ada
1
star
33

helios

Helios Fast Reliable Monitoring Agent
Ada
1
star
34

awa-alire-index

1
star
35

xcra

Automatically exported from code.google.com/p/xcra
C++
1
star