pg.meg
1.0.0
dotnet add package pg.meg --version 1.0.0
NuGet\Install-Package pg.meg -Version 1.0.0
<PackageReference Include="pg.meg" Version="1.0.0" />
paket add pg.meg --version 1.0.0
#r "nuget: pg.meg, 1.0.0"
// Install pg.meg as a Cake Addin #addin nuget:?package=pg.meg&version=1.0.0 // Install pg.meg as a Cake Tool #tool nuget:?package=pg.meg&version=1.0.0
Mega File Format
Implements the Petroglyph v1.0 meg archive file type in C#
.
Special thanks to @MikeLankamp for decoding the files and hosting them on Petrolution.
Introduction
Mega Files (extension: .MEG) in Petroglyph's games are used to store the collection of game files. By packing these files into a single large file, the operating-system overhead of storing and opening each individual file is removed and it helps avoid fragmentation.
Format Specification v1.0
Each Mega File begins with a header, followed by the Filename Table, the File Table and finally, the file data. All fields are in little-endian format.
Header
Offset | Name | Type | Description |
---|---|---|---|
+0000h |
numFilenames | uint32 |
Number of filenames in the Filename Table |
+0004h |
numFiles | uint32 |
Number of files in the File Table |
Filename Table Record
Offset | Name | Type | Description |
---|---|---|---|
+0000h |
length | uint16 |
Length of the filename, in characters |
+0004h |
name | length |
The ASCII filename |
File Table Record
Offset | Name | Type | Description |
---|---|---|---|
+0000h |
crc | uint32 |
CRC-32 of the filename |
+0004h |
index | uint32 |
Index of this record in the table |
+0008h |
size | uint32 |
Size of the file, in bytes |
+000Ch |
start | uint32 |
Start of the file, in bytes , from the start of the Mega File |
+0010h |
name | uint32 |
Index in the Filename Table of the filename |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- pg.util (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 1,117 | 10/25/2019 |
Initial release