ReXGlue SDK
Loading...
Searching...
No Matches
stfs.h File Reference

STFS and SVOD package layouts and container reader. More...

#include <array>
#include <filesystem>
#include <span>
#include <string>
#include <string_view>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include <rex/platform.h>
#include <rex/assert.h>
#include <rex/math.h>
#include <rex/memory/endian.h>
#include <rex/string/text.h>
#include <rex/result.h>
#include <rex/filesystem/xex.h>
#include <rex/kernel/types/xex.h>
#include <rex/kernel/types/content.h>
#include <rex/types.h>
#include <rex/filesystem/file_stat.h>
#include <rex/utility.h>

Go to the source code of this file.

Classes

struct  rex::filesystem::STFSVolumeDescriptor
struct  rex::filesystem::STFSHashEntry
struct  rex::filesystem::STFSHashTable
struct  rex::filesystem::STFSDirectoryEntry
struct  rex::filesystem::STFSDirectoryBlock
struct  rex::filesystem::SVODDeviceDescriptor
struct  rex::filesystem::XContentLicense
struct  rex::filesystem::XContentMedia
struct  rex::filesystem::XContentAvatarAsset
struct  rex::filesystem::XContentAttributes
struct  rex::filesystem::XContentHeader
struct  rex::filesystem::XContentPackageHeader
struct  rex::filesystem::ContainerExtent
struct  rex::filesystem::ContainerNode
class  rex::filesystem::IContainerImage

Namespaces

namespace  rex

Enumerations

enum class  rex::filesystem::XContentPackageType : u32 { kCon = 0x434F4E20 , kPirs = 0x50495253 , kLive = 0x4C495645 }
enum class  rex::filesystem::XContentVolumeType : u32 { kSTFS = 0 , kSVOD = 1 }
enum class  rex::filesystem::STFSHashState : u8 { kFree = 0 , kFreePresent = 1 , kInUse = 2 }
enum class  rex::filesystem::ContainerType : u8 { kSTFS , kSVOD , kGDFX }

Variables

constexpr u32 rex::filesystem::kSTFSBlockSize = 0x1000
constexpr u32 rex::filesystem::kSTFSMaxBlocks = 4913000
constexpr std::array< u32, 3 > rex::filesystem::kSTFSBlocksPerHashLevel = {170, 28900, kSTFSMaxBlocks}

Detailed Description

STFS and SVOD package layouts and container reader.

License
BSD 3-Clause License See LICENSE file in the project root for full license text.
Remarks
Derived from Xenia's xenia/vfs/devices/stfs_xbox.h (Ben Vanik, 2021).

Enumeration Type Documentation

◆ ContainerType

enum class rex::filesystem::ContainerType : u8
strong
Enumerator
kSTFS 

STFS package in one file.

kSVOD 

SVOD package, a header file and data fragments.

◆ STFSHashState

enum class rex::filesystem::STFSHashState : u8
strong
Enumerator
kFree 

Unallocated and absent from the package.

kFreePresent 

Unallocated and present in the package.

◆ XContentPackageType

enum class rex::filesystem::XContentPackageType : u32
strong

Package magic, the first 4 bytes of a package.

Enumerator
kCon 

CON, signed by a console.

kPirs 

PIRS, signed by Microsoft for offline content.

kLive 

LIVE, signed by Microsoft for Live content.

◆ XContentVolumeType

enum class rex::filesystem::XContentVolumeType : u32
strong
Enumerator
kSTFS 

Secure transacted file system in one file.

kSVOD 

Secure virtual optical disc, a header file and data fragments.

Variable Documentation

◆ kSTFSBlocksPerHashLevel

std::array<u32, 3> rex::filesystem::kSTFSBlocksPerHashLevel = {170, 28900, kSTFSMaxBlocks}
inlineconstexpr

Blocks covered by one hash table at each of the three hash levels.