streams-gzip.cpp revision 66632b492f9cd54e5667fd4e1fca8e457f59b282
/*
* IO layer : gzip streambuf and streams
*
* Authors:
* Johan Ceuppens <jceuppen at easynet dot be>
*
* Copyright (C) 2004 Johan Ceuppens
*
* Released under GNU LGPL, read the file 'COPYING.LIB' for more information
*/
#include <cstring>
#include <string>
#include <string.h>
#include "streams-gzip.h"
namespace Inkscape {
//With some inpsiration and code from libgsf, fastjar, libpng and RFC 1952
static unsigned int const GZIP_HEADER_FLAGS = (GZIP_IS_ASCII
/**
* GZipBuffer
*/
{
unsigned int flags;
try {
//get_modification_time()
//check_extra_flags();
//check_OS();
if (flags & GZIP_EXTRA_FIELD) {
}
if (flags & GZIP_ORIGINAL_NAME) {
get_filename();
}
if (flags & GZIP_HAS_COMMENT) {
get_comment();
}
if (flags & GZIP_HEADER_CRC) {
get_crc();
}
}
throw GZipHeaderException();
}
}
{
throw GZipHeaderException();
}
{
throw GZipHeaderException();
}
{
#ifdef DEBUG_STREAMS
#endif
return read_string();
}
{
#ifdef DEBUG_STREAMS
#endif
return read_string();
}
{
return buf;
}
void GZipBuffer::get_extrafield()
{
}
{
try {
do {
#ifdef DEBUG_STREAMS
#endif
} while (*byte != 0);
throw GZipHeaderException();
}
#ifdef DEBUG_STREAMS
#endif
return ret;
}
} // namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :