Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GZipIn.h « GZip « Archive « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 998470e0f203d9c1a0f26f9e7a02c85b1b84886f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Archive/GZipIn.h

#ifndef __ARCHIVE_GZIP_IN_H
#define __ARCHIVE_GZIP_IN_H

#include "GZipHeader.h"
#include "GZipItem.h"
#include "Common/CRC.h"
#include "../../IStream.h"

namespace NArchive {
namespace NGZip {
  
class CInArchive
{
  UInt64 m_Position;
  
  HRESULT ReadBytes(ISequentialInStream *inStream, void *data, UInt32 size);
  HRESULT ReadZeroTerminatedString(ISequentialInStream *inStream, AString &resString, CCRC &crc);
  HRESULT ReadByte(ISequentialInStream *inStream, Byte &value);
  HRESULT ReadUInt16(ISequentialInStream *inStream, UInt16 &value);
  HRESULT ReadUInt32(ISequentialInStream *inStream, UInt32 &value);
public:
  HRESULT ReadHeader(ISequentialInStream *inStream, CItem &item);
  HRESULT ReadPostHeader(ISequentialInStream *inStream, CItem &item);
  UInt64 GetOffset() const { return m_Position; }
};
  
}}
  
#endif