2018-04-05 16:47:07 +00:00
|
|
|
/**
|
|
|
|
* \file compress.hh
|
|
|
|
* \brief Header for compression functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LZW_SRC_COMPRESS_H_
|
|
|
|
#define LZW_SRC_COMPRESS_H_
|
|
|
|
|
|
|
|
#include "common.hh"
|
|
|
|
#include <vector>
|
2018-04-26 09:54:02 +00:00
|
|
|
#include <iostream>
|
2018-04-29 12:13:14 +00:00
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
/// \brief Exécution des threads et écriture de leur résultat dans le fichier de sortie
|
2018-05-03 11:28:17 +00:00
|
|
|
void join_and_write(std::vector<std::pair<std::unique_ptr<std::thread>,
|
|
|
|
std::vector<std::uint32_t>>> &,
|
|
|
|
std::vector<std::vector<std::uint32_t>> &);
|
2018-04-05 16:47:07 +00:00
|
|
|
|
|
|
|
/// \brief Compression d'une chaine de caractères
|
2018-04-26 11:49:39 +00:00
|
|
|
void lzw_compress(const std::vector<char> &, std::vector<std::uint32_t> &);
|
2018-04-05 16:47:07 +00:00
|
|
|
|
2018-04-10 08:39:41 +00:00
|
|
|
/// \brief Wrapper de \ref lzw_compress
|
2018-04-26 11:49:39 +00:00
|
|
|
void compress(const std::string &, const char *);
|
2018-04-10 08:39:41 +00:00
|
|
|
|
2018-04-05 16:47:07 +00:00
|
|
|
#endif /* LZW_SRC_COMPRESS_H_ */
|