Documentation
¶
Index ¶
- Constants
- func AddFiles(archive *pb.PAKArchive, name string, data []byte)
- func ExtractFile(archive *pb.PAKArchive, name string) (*pb.PAKFile, error)
- func Marshal(archive *pb.PAKArchive) ([]byte, error)
- func RemoveFile(archive *pb.PAKArchive, name string) error
- func Unmarshal(data []byte) (*pb.PAKArchive, error)
- type PKZFile
Constants ¶
View Source
const ( Magic = (('K' << 24) + ('C' << 16) + ('A' << 8) + 'P') HeaderLength = 12 FileBlockLength = 64 // name + offset + length FileNameLength = 56 FileOffset = 56 FileLength = 60 Separator = "/" // always use linux-style, even on windows )
Variables ¶
This section is empty.
Functions ¶
func AddFiles ¶ added in v1.0.233
func AddFiles(archive *pb.PAKArchive, name string, data []byte)
Add a new file to the contents of the PAK. You'll need to have already os.ReadFile()'d to get the data.
func ExtractFile ¶ added in v1.0.233
Obtain a pointer to a file contained in a PAK archive.
func Marshal ¶ added in v1.0.233
func Marshal(archive *pb.PAKArchive) ([]byte, error)
generate a binary pak, it should be written to disk after.
func RemoveFile ¶ added in v1.0.233
func RemoveFile(archive *pb.PAKArchive, name string) error
Delete a file contained in a PAK archive
Types ¶
type PKZFile ¶
func NewPKZFile ¶
func OpenPKZFile ¶
Click to show internal directories.
Click to hide internal directories.