Tfe

Ongi etorri tfe-ren webgunera...

Old stuff/ecole_etude_fac_de_pau/licence_3/projet_lzw/include/outputstream.h

(Deskargatu)
/*
    This file is part of projet_lzw_univ_pau.

    projet_lzw_univ_pau is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    projet_lzw_univ_pau is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with projet_lzw_univ_pau; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/


#ifndef _deflateroutputstream
#include <ostream>
#include <string>
#include "deflater.h"



class DeflaterOutputStream
{
    private:
	std::ostream&  sortie ; 
	Deflater comp;	 //  objet Deflater
	std::vector<char> buffer;
	
	
    public:

	DeflaterOutputStream(std::ostream&);  //Constructeur avec recopie referentielle
	DeflaterOutputStream(std::ostream&, Deflater&); 

	
	~DeflaterOutputStream();
	//Destructeur 
	
	DeflaterOutputStream& operator<<(std::vector<char>&); // ajout manuel d un tableau de chars
	DeflaterOutputStream& operator<<(const std::string&); // Ajout manuel d un string
	int DeflateFromFile(char*); // Compression a partir d un fichier
	DeflaterOutputStream& end(); // Fin de compression
};






#endif