WIP
This commit is contained in:
@ -20,6 +20,7 @@ void MashZip::unmashzip_stream(std::basic_istream<char> &is, std::basic_ostream<
|
||||
|
||||
// load huffman table
|
||||
HuffmanTable ht(header);
|
||||
|
||||
ibitstream ibs(is);
|
||||
|
||||
char sym = '\0';
|
||||
@ -40,13 +41,11 @@ void MashZip::unmashzip_stream(std::basic_istream<char> &is, std::basic_ostream<
|
||||
void MashZip::mashzip_file(std::basic_istream<char> &cs, std::basic_istream<char> &is, std::basic_ostream<char> &os)
|
||||
{
|
||||
// std::ifstream ifs(name, std::ios::binary);
|
||||
// is.seekg(0);
|
||||
|
||||
os.write(MAGIC, 4);
|
||||
|
||||
// build huffman table by file
|
||||
HuffmanTable ht(cs);
|
||||
// is.seekg(0); // reset position as ht reads whole file
|
||||
|
||||
os.write(ht.to_header(), HEADER_SIZE);
|
||||
|
||||
|
Reference in New Issue
Block a user