lzw-assignment/src/bitpack.hh

31 lines
1.1 KiB
C++
Raw Normal View History

#ifndef LZW_SRC_BITPACK_H_
#define LZW_SRC_BITPACK_H_
#include <cstdint>
#include <string>
#include <vector>
std::vector<unsigned char> pack(const std::vector<std::uint16_t> &);
2018-06-09 20:59:11 +00:00
2018-06-21 15:38:51 +00:00
std::vector<unsigned char> pack_n(std::vector<std::uint16_t>::const_iterator,
std::vector<std::uint16_t>::const_iterator,
std::vector<unsigned char> &, int);
2018-06-21 15:38:51 +00:00
std::vector<unsigned char> pack_16(std::vector<std::uint16_t>::const_iterator,
std::vector<std::uint16_t>::const_iterator,
std::vector<unsigned char> &);
std::vector<std::uint16_t> unpack(std::basic_string<unsigned char> &&);
2018-06-09 20:59:11 +00:00
std::vector<std::uint16_t>
2018-06-17 04:38:57 +00:00
unpack_n(std::basic_string<unsigned char>::const_iterator t_begin,
2018-06-21 15:38:51 +00:00
std::basic_string<unsigned char>::const_iterator t_end,
std::vector<std::uint16_t> &, int t_n);
2018-06-09 20:59:11 +00:00
std::vector<std::uint16_t>
2018-06-17 04:38:57 +00:00
unpack_16(std::basic_string<unsigned char>::const_iterator,
2018-06-21 15:38:51 +00:00
std::basic_string<unsigned char>::const_iterator,
std::vector<std::uint16_t> &);
#endif /* LZW_SRC_BITPACK_H_ */