25 #ifndef AURORA_ERFFILE_H 26 #define AURORA_ERFFILE_H 40 class SeekableReadStream;
231 std::vector<byte> &password);
273 Encryption encryption,
const std::vector<byte> &password);
275 Encryption encryption,
const std::vector<byte> &password);
278 Encryption encryption,
const std::vector<byte> &password);
280 Encryption encryption,
const std::vector<byte> &password);
283 const std::vector<byte> &password);
285 const std::vector<byte> &md5, std::vector<byte> &password);
287 std::vector<byte> &password);
294 uint32 unpackedSize)
const;
297 uint32 unpackedSize)
const;
299 uint32 unpackedSize)
const;
301 uint32 unpackedSize)
const;
304 uint32 unpackedSize,
int windowBits)
const;
312 #endif // AURORA_ERFFILE_H Common::SeekableReadStream * decompressZlib(const byte *compressedData, uint32 packedSize, uint32 unpackedSize, int windowBits) const
Common::SeekableReadStream * decompress(Common::MemoryReadStream *packedStream, uint32 unpackedSize) const
A class holding an UTF-8 string.
Common::SeekableReadStream * decompressStandardZlib(Common::MemoryReadStream *packedStream, uint32 unpackedSize) const
static void verifyVersion(uint32 id, uint32 version, bool utf16le)
Compression using DEFLATE with default parameters.
static void readV20Header(Common::SeekableReadStream &erf, ERFHeader &header)
void readV11KeyList(Common::SeekableReadStream &erf, const ERFHeader &header)
void readV20ResList(Common::SeekableReadStream &erf, const ERFHeader &header)
ResourceList _resources
External list of resource names and types.
static void readV30Header(Common::SeekableReadStream &erf, ERFHeader &header, uint32 &flags)
static void readV22Header(Common::SeekableReadStream &erf, ERFHeader &header, uint32 &flags)
Handling various archive files.
void verifyPasswordDigest()
void readV22ResList(Common::SeekableReadStream &erf, const ERFHeader &header)
static bool decryptNWNPremiumHeader(Common::SeekableReadStream &erf, ERFHeader &header, const std::vector< byte > &password)
void readResources(Common::SeekableReadStream &erf, const ERFHeader &header)
const LocString & getDescription() const
Return the description.
ERFFile(Common::SeekableReadStream *erf, const std::vector< byte > &password=std::vector< byte >())
Take over this stream and read an ERF file out of it.
A simple scoped smart pointer template.
Blowfish encryption as used by Dragon Age II (V3.0).
void readV10ResList(Common::SeekableReadStream &erf, const ERFHeader &header)
Blowfish encryption as used by Neverwinter Nights (V1.1).
static void readDescription(LocString &description, Common::SeekableReadStream &erf, const ERFHeader &header)
std::vector< byte > _password
The password we were given, if any.
Compression using DEFLATE with an extra header byte.
static void readV10Header(Common::SeekableReadStream &erf, ERFHeader &header)
Common::SeekableReadStream * getResource(uint32 index, bool tryNoCopy=false) const
Return a stream of the resource's contents.
const ResourceList & getResources() const
Return the list of resources.
std::list< Resource > ResourceList
IResourceList _iResources
Internal list of resource offsets and sizes.
Base for BioWare's Aurora engine files.
void readV21ResList(Common::SeekableReadStream &erf, const ERFHeader &header)
uint32 unpackedSize
The resource's unpacked size.
static void readV11Header(Common::SeekableReadStream &erf, ERFHeader &header)
Simple memory based 'stream', which implements the ReadStream interface for a plain memory block...
HashAlgo
The algorithm used for hashing.
Low-level type definitions to handle fixed width types portably.
Blowfish encryption as used by Dragon Age: Origins (V2.2).
static bool findNWNPremiumKey(Common::SeekableReadStream &erf, ERFHeader &header, const std::vector< byte > &md5, std::vector< byte > &password)
uint32 getBuildDay() const
Return the day of year the ERF was built.
std::vector< IResource > IResourceList
Handling BioWare's localized strings.
static Common::MemoryReadStream * decrypt(Common::SeekableReadStream &cryptStream, Encryption encryption, const std::vector< byte > &password)
Basic type definitions to handle files used in BioWare's Aurora engine.
Common::SeekableReadStream * decompressBiowareZlib(Common::MemoryReadStream *packedStream, uint32 unpackedSize) const
Common::ScopedPtr< Common::SeekableReadStream > _erf
XOR encryption as used by V2.2 and V3.0 (UNSUPPORTED!)
uint32 packedSize
The resource's packed size.
uint32 offset
The offset of the resource within the ERF.
void readV10KeyList(Common::SeekableReadStream &erf, const ERFHeader &header)
Class to hold resource data of an ERF archive file.
void readV30ResList(Common::SeekableReadStream &erf, const ERFHeader &header)
Base class for most files found in games using BioWare's Aurora engine.
uint32 getResourceSize(uint32 index) const
Return the size of a resource.
Common::HashAlgo getNameHashAlgo() const
Return with which algorithm the name is hashed.
LocString _description
The ERF's description.
const IResource & getIResource(uint32 index) const
Compression using DEFLATE, standard zlib chunk.
An abstract file archive.
Common::SeekableReadStream * decompressHeaderlessZlib(Common::MemoryReadStream *packedStream, uint32 unpackedSize) const
static void readERFHeader(Common::SeekableReadStream &erf, ERFHeader &header, uint32 version, std::vector< byte > &password)
Internal resource information.
uint32 getBuildYear() const
Return the year the ERF was built.
Interface for a seekable & readable data stream.
static void readV21Header(Common::SeekableReadStream &erf, ERFHeader &header)
static void readNWNPremiumHeader(Common::SeekableReadStream &erf, ERFHeader &header, std::vector< byte > &password)