V-Gears 0
Free Final Fantasy VII engine.
BinGZipFile.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include "common/File.h"
19
23class BinGZipFile : public File{
24
25 public:
26
32 BinGZipFile(const Ogre::String& file);
33
39 BinGZipFile(File* file);
40
48 BinGZipFile(File* file, u32 offset, u32 length);
49
57 BinGZipFile(u8* buffer, u32 offset, u32 length);
58
62 virtual ~BinGZipFile();
63
71 File* ExtractGZip(u32 file_index);
72
79
80 private:
81
86
94 u32 InnerGetFileOffset(u32 file_index);
95
100};
Ogre::uint32 u32
Definition: TypeDefine.h:23
Ogre::uint8 u8
Definition: TypeDefine.h:21
Handles GZip-compressed BIn files.
Definition: BinGZipFile.h:23
BinGZipFile(const Ogre::String &file)
Constructor.
Definition: BinGZipFile.cpp:22
virtual ~BinGZipFile()
Destructor.
Definition: BinGZipFile.cpp:40
u32 file_count_
The number of files in the archive.
Definition: BinGZipFile.h:99
void InnerGetNumberOfFiles()
Counts the number of packed files and sets {.
Definition: BinGZipFile.cpp:136
File * ExtractGZip(u32 file_index)
Extracts a file from the compressed BIN file.
Definition: BinGZipFile.cpp:42
u32 InnerGetFileOffset(u32 file_index)
Retrieves a file offset.
Definition: BinGZipFile.cpp:159
u32 GetNumberOfFiles()
Counts the number of files packed in the compressed BIN file.
Definition: BinGZipFile.cpp:134
Represents a file.
Definition: File.h:24
Ogre::String String
Definition: TypeDefine.h:37