1
/***************************************************************************
2
* Copyright (C) 2008 by Valerio Pilo *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU Lesser General Public License as *
7
* published by the Free Software Foundation; either version 2.1 of the *
8
* License, or (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU Lesser General Public *
16
* License along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
21
#ifndef ISFCOMPRESSION_HUFFMAN_H
22
#define ISFCOMPRESSION_HUFFMAN_H
24
#include "../datasource.h"
32
namespace HuffmanAlgorithm
35
bool deflate( QByteArray &encodedData, quint8 index, const QList<qint64> &source );
36
bool inflate( DataSource &source, quint64 length, quint8 index, QList<qint64> &decodedData );
37
quint8 index( const QList<qint64> &data );
39
// Internal use methods
41
bool deflateValue( DataSource &output, quint8 index, qint64 value );