#include <cassert>
#include <cstdlib> // rand()
-#include <iostream>
#include <cstring> // for memset, memcpy
#include <simgear/debug/logstream.hxx>
void ContentDecoder::setEncoding(const std::string& encoding)
{
- std::cout << "setEncoding:" << encoding << std::endl;
if (encoding == "gzip") {
_contentDeflate = true;
_needGZipHeader = true;
_inputSize += s;
if (_needGZipHeader && !consumeGZipHeader()) {
- std::cout << "waiting on GZIP header" << std::endl;
// still waiting on the full GZIP header, so done
return;
}
}
void ContentDecoder::reallocateInputBuffer(size_t newSize)
-{
- std::cout << "reallocate:" << newSize << std::endl;
-
-
+{
_input = (unsigned char*) realloc(_input, newSize);
_inputAllocated = newSize;
}