Documentation ¶
Index ¶
- Constants
- Variables
- func GetDeltaManifest(baseURL string, newBuildID string, oldBuildID string) []byte
- func LoadFileBytes(path string) []byte
- func LoadURLBytes(url string) []byte
- func StringContains(array []string, s string) bool
- func StringContains2(array []string, array2 []string) bool
- func StringContains3(array []string, array2 []string) bool
- type BinaryManifest
- type Chunk
- type ChunkPart
- type EFeatureLevel
- type FChunkDataList
- type FCustomFields
- type FFileManifestList
- type FManifestHeader
- type FManifestMeta
- type File
Constants ¶
View Source
const ( StoredCompressed uint8 = 0x01 StoredEncrypted uint8 = 0x02 )
View Source
const BinaryManifestMagic = 0x44BEC00C
Variables ¶
View Source
var (
ErrBadMagic = errors.New("bad magic found, must be 0x44BEC00C")
)
Functions ¶
func GetDeltaManifest ¶
func LoadFileBytes ¶
func LoadURLBytes ¶
func StringContains ¶
func StringContains2 ¶
func StringContains3 ¶
Types ¶
type BinaryManifest ¶
type BinaryManifest struct { Header *FManifestHeader Metadata *FManifestMeta ChunkDataList *FChunkDataList FileManifestList *FFileManifestList CustomFields *FCustomFields }
func ParseManifest ¶
func ParseManifest(f io.ReadSeeker) (*BinaryManifest, error)
func (*BinaryManifest) ApplyDelta ¶
func (m *BinaryManifest) ApplyDelta(deltaManifest *BinaryManifest)
type Chunk ¶
type EFeatureLevel ¶
type EFeatureLevel int32
const ( // The original version. EFeatureLevelOriginal EFeatureLevel = iota + 0 // Support for custom fields. EFeatureLevelCustomFields // Started storing the version number. EFeatureLevelStartStoringVersion // Made after data files where renamed to include the hash value, these chunks now go to ChunksV2. EFeatureLevelDataFileRenames // Manifest stores whether build was constructed with chunk or file data. EFeatureLevelStoresIfChunkOrFileData // Manifest stores group number for each chunk/file data for reference so that external readers don't need to know how to calculate them. EFeatureLevelStoresDataGroupNumbers // Added support for chunk compression, these chunks now go to ChunksV3. NB: Not File Data Compression yet. EFeatureLevelChunkCompressionSupport // Manifest stores product prerequisites info. EFeatureLevelStoresPrerequisitesInfo // Manifest stores chunk download sizes. EFeatureLevelStoresChunkFileSizes // Manifest can optionally be stored using UObject serialization and compressed. EFeatureLevelStoredAsCompressedUClass // These two features were removed and never used. EFeatureLevelUNUSED_0 EFeatureLevelUNUSED_1 // Manifest stores chunk data SHA1 hash to use in place of data compare, for faster generation. EFeatureLevelStoresChunkDataShaHashes // Manifest stores Prerequisite Ids. EFeatureLevelStoresPrerequisiteIds // The first minimal binary format was added. UObject classes will no longer be saved out when binary selected. EFeatureLevelStoredAsBinaryData // Temporary level where manifest can reference chunks with dynamic window size, but did not serialize them. Chunks from here onwards are stored in ChunksV4. EFeatureLevelVariableSizeChunksWithoutWindowSizeChunkInfo // Manifest can reference chunks with dynamic window size, and also serializes them. EFeatureLevelVariableSizeChunks // Manifest stores a unique build id for exact matching of build data. EFeatureLevelStoresUniqueBuildId // !! Always after the latest version entry, signifies the latest version plus 1 to allow the following Latest alias. EFeatureLevelLatestPlusOne // An alias for the actual latest version value. EFeatureLevelLatest = (EFeatureLevelLatestPlusOne - 1) // An alias to provide the latest version of a manifest supported by file data (nochunks). LatestNoChunks = EFeatureLevelStoresChunkFileSizes // An alias to provide the latest version of a manifest supported by a json serialized format. LatestJson = EFeatureLevelStoresPrerequisiteIds // An alias to provide the first available version of optimised delta manifest saving. FirstOptimisedDelta = EFeatureLevelStoresUniqueBuildId // JSON manifests were stored with a version of 255 during a certain CL range due to a bug. // We will treat this as being StoresChunkFileSizes in code. EFeatureLevelBrokenJsonVersion = 255 // This is for UObject default, so that we always serialize it. EFeatureLevelInvalid = -1 )
func (EFeatureLevel) ChunkSubDir ¶
func (e EFeatureLevel) ChunkSubDir() string
ChunkSubDir returns the chunk version sub directory
func (EFeatureLevel) String ¶
func (i EFeatureLevel) String() string
type FChunkDataList ¶
type FChunkDataList struct { DataSize uint32 DataVersion uint8 Count uint32 Chunks []*Chunk ChunkLookup map[uuid.UUID]uint32 }
func ReadChunkDataList ¶
func ReadChunkDataList(f io.ReadSeeker) (*FChunkDataList, error)
type FCustomFields ¶
type FCustomFields struct { DataSize uint32 DataVersion uint8 Count uint32 Fields map[string]string }
func ReadCustomFields ¶
func ReadCustomFields(f io.ReadSeeker) (*FCustomFields, error)
type FFileManifestList ¶
type FFileManifestList struct { DataSize uint32 DataVersion uint8 Count uint32 FileManifestList []File }
func ReadFileManifestList ¶
func ReadFileManifestList(f io.ReadSeeker, dataList *FChunkDataList) (*FFileManifestList, error)
func (*FFileManifestList) GetFileByPath ¶
func (f *FFileManifestList) GetFileByPath(p string) *File
type FManifestHeader ¶
type FManifestHeader struct { HeaderSize int32 DataSizeUncompressed int32 DataSizeCompressed int32 SHAHash [20]byte StoredAs uint8 Version EFeatureLevel }
func ParseHeader ¶
func ParseHeader(f io.ReadSeeker) (*FManifestHeader, error)
func (FManifestHeader) String ¶
func (h FManifestHeader) String() string
type FManifestMeta ¶
type FManifestMeta struct { DataSize uint32 DataVersion uint8 FeatureLevel EFeatureLevel IsFileData bool AppID int32 AppName string BuildVersion string LaunchExe string LaunchCommand string PrereqIds []string PrereqName string PrereqPath string PrereqArgs string // if DataVersion >= 1 BuildId string }
func ReadFManifestMeta ¶
func ReadFManifestMeta(f io.ReadSeeker) (*FManifestMeta, error)
func (FManifestMeta) String ¶
func (m FManifestMeta) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.