22#ifndef COMMON_POWERPACKER_H
23#define COMMON_POWERPACKER_H
25#include "common/stream.h"
34 static int ppDecrunchBuffer(
const byte *src,
byte *dest, uint32 src_len, uint32 dest_len);
35 static uint16 getCrunchType(uint32 signature);
40 static byte *unpackBuffer(
const byte *input, uint32 input_len, uint32 &output_len);
43 if (_dispose)
delete _stream;
46 int64
size()
const override {
47 return _stream->
size();
50 int64
pos()
const override {
51 return _stream->
pos();
54 bool eos()
const override {
55 return _stream->
eos();
58 bool seek(int64 offs,
int whence = SEEK_SET)
override {
59 return _stream->
seek(offs, whence);
62 uint32
read(
void *dataPtr, uint32 dataSize)
override {
63 return _stream->
read(dataPtr, dataSize);
Definition: powerpacker.h:28
bool eos() const override
Definition: powerpacker.h:54
uint32 read(void *dataPtr, uint32 dataSize) override
Definition: powerpacker.h:62
int64 size() const override
Definition: powerpacker.h:46
int64 pos() const override
Definition: powerpacker.h:50
bool seek(int64 offs, int whence=SEEK_SET) override
Definition: powerpacker.h:58
virtual bool eos() const =0
virtual uint32 read(void *dataPtr, uint32 dataSize)=0
virtual int64 pos() const =0
virtual int64 size() const =0
virtual bool seek(int64 offset, int whence=SEEK_SET)=0
Definition: algorithm.h:29