Back to... Zip-Ada

Source file : lzh.ads



   1  --  *CAUTION* : bug on the last decoded byte (see "BUG" below)
   2  ---------------
   3  --
   4  --  Generic LZH compression and decompression Ada 95 package.
   5  --
   6  --    Based on the famous LZHUF by H. OKUMURA & H. YOSHIZAKI
   7  --    Read package body for details (including trailing byte BUG !).
   8  --
   9  --  Legal licensing note:
  10  --
  11  --  Copyright (c) 1999 .. 2009 Gautier de Montmollin (maintainer of the Ada version)
  12  --
  13  --  Permission is hereby granted, free of charge, to any person obtaining a copy
  14  --  of this software and associated documentation files (the "Software"), to deal
  15  --  in the Software without restriction, including without limitation the rights
  16  --  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  17  --  copies of the Software, and to permit persons to whom the Software is
  18  --  furnished to do so, subject to the following conditions:
  19  --
  20  --  The above copyright notice and this permission notice shall be included in
  21  --  all copies or substantial portions of the Software.
  22  --
  23  --  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  24  --  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  25  --  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  26  --  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  27  --  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  28  --  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  29  --  THE SOFTWARE.
  30  --
  31  --  NB: this is the MIT License, as found 12-Sep-2007 on the site
  32  --  http://www.opensource.org/licenses/mit-license.php
  33  
  34  with Interfaces; use Interfaces;
  35  
  36  generic
  37  
  38    --  Input:
  39    with function  Read_byte return Unsigned_8;
  40    with function  More_bytes return Boolean;
  41    --  Output:
  42    with procedure Write_byte (b : Unsigned_8);
  43  
  44    --  NB: when the encoding length can be determined, a feedback information
  45    --  (percents compressed/decompressed) can be achieved in Read_byte.
  46  
  47  package LZH is
  48    procedure Encode;
  49    procedure Decode;
  50  end LZH;

Web view of Ada source code generated by GNATHTML, project: ALI_Parse version 1.0.
Zip-Ada: Ada library for zip archive files (.zip). Ada programming.
Some news about Zip-Ada and other Ada projects on Gautier's blog.