UPDATE: Add ldiff

This commit is contained in:
2025-08-25 18:12:13 +07:00
parent 99b9df1ce5
commit 6b222bfa70
45 changed files with 1700 additions and 535 deletions

73
pkg/firefly/chunk.go Normal file
View File

@@ -0,0 +1,73 @@
package firefly
import (
"fmt"
"io"
"os"
"path/filepath"
"golang.org/x/exp/mmap"
)
type ChunkInfo struct {
Name string
Offset int64
Size int64
}
func ProcessWithBufReader(path string, chunks []ChunkInfo) {
file, err := os.Open(path)
if err != nil {
fmt.Printf("Error opening file %s: %v\n", path, err)
return
}
defer file.Close()
for _, chunk := range chunks {
buffer, err := ReadChunkData(file, chunk.Offset, chunk.Size)
if err != nil {
fmt.Printf("Error reading chunk %s: %v\n", chunk.Name, err)
continue
}
assetPath := filepath.Join("chunk_tmp", chunk.Name)
parentDir := filepath.Dir(assetPath)
if _, err := os.Stat(parentDir); os.IsNotExist(err) {
if err := os.MkdirAll(parentDir, 0o755); err != nil {
fmt.Printf("Error creating directory %s: %v\n", parentDir, err)
continue
}
}
if err := os.WriteFile(assetPath, buffer, 0o644); err != nil {
fmt.Printf("Error writing chunk file %s: %v\n", assetPath, err)
}
}
}
func ReadChunkData(file *os.File, offset, size int64) ([]byte, error) {
info, err := file.Stat()
if err != nil {
return nil, fmt.Errorf("error getting file info: %w", err)
}
if info.Size() > 1024*1024 && size > 1024*1024 {
mmapReader, err := mmap.Open(file.Name())
if err == nil {
defer mmapReader.Close()
buffer := make([]byte, size)
_, err := mmapReader.ReadAt(buffer, offset)
if err != nil && err != io.EOF {
return nil, fmt.Errorf("error reading mmap: %w", err)
}
return buffer, nil
}
}
buffer := make([]byte, size)
_, err = file.ReadAt(buffer, offset)
if err != nil && err != io.EOF {
return nil, fmt.Errorf("error reading buffered: %w", err)
}
return buffer, nil
}

94
pkg/firefly/ldiff.go Normal file
View File

@@ -0,0 +1,94 @@
package firefly
import (
"firefly-launcher/pkg/firefly/pb"
"fmt"
"os"
"path/filepath"
"golang.org/x/exp/mmap"
)
func LDiffFile(data *pb.AssetManifest, assetName string, assetSize int64, ldiffsDir, outputDir string) error {
path := filepath.Join(ldiffsDir, data.ChunkFileName)
info, err := os.Stat(path)
if err != nil {
return fmt.Errorf("%s does not exist: %w", path, err)
}
fileSize := info.Size()
var buffer []byte
if fileSize > 10*1024*1024 && data.HdiffFileSize > 1*1024*1024 {
// mmap for large files using x/exp/mmap
reader, err := mmap.Open(path)
if err != nil {
// fallback to buffered read
file, err := os.Open(path)
if err != nil {
return fmt.Errorf("error opening file %s: %w", path, err)
}
defer file.Close()
buffer, err = ReadBuffer(file, data.HdiffFileInChunkOffset, data.HdiffFileSize)
if err != nil {
return err
}
} else {
defer reader.Close()
buffer = make([]byte, data.HdiffFileSize)
_, err := reader.ReadAt(buffer, data.HdiffFileInChunkOffset)
if err != nil {
return fmt.Errorf("error reading mmap data: %w", err)
}
}
} else {
// small files, buffered read
file, err := os.Open(path)
if err != nil {
return fmt.Errorf("error opening file %s: %w", path, err)
}
defer file.Close()
buffer, err = ReadBuffer(file, data.HdiffFileInChunkOffset, data.HdiffFileSize)
if err != nil {
return err
}
}
extension := ""
if data.OriginalFileSize != 0 || assetSize != data.HdiffFileSize {
extension = ".hdiff"
}
assetPath := filepath.Join(outputDir, assetName+extension)
parentDir := filepath.Dir(assetPath)
if _, err := os.Stat(parentDir); os.IsNotExist(err) {
if err := os.MkdirAll(parentDir, 0o755); err != nil {
return fmt.Errorf("error creating directory %s: %w", parentDir, err)
}
}
if err := os.WriteFile(assetPath, buffer, 0o644); err != nil {
return fmt.Errorf("error writing file %s: %w", assetPath, err)
}
return nil
}
func ReadBuffer(file *os.File, offset int64, size int64) ([]byte, error) {
buffer := make([]byte, size)
n, err := file.ReadAt(buffer, offset)
if err != nil {
return nil, fmt.Errorf("error reading data: %w", err)
}
if int64(n) != size {
return nil, fmt.Errorf("expected %d bytes, but read %d bytes", size, n)
}
return buffer, nil
}

66
pkg/firefly/loader.go Normal file
View File

@@ -0,0 +1,66 @@
package firefly
import (
"bufio"
"firefly-launcher/pkg/firefly/pb"
"io"
"os"
"github.com/klauspost/compress/zstd"
"google.golang.org/protobuf/proto"
)
func LoadChunkProto(path string) (*pb.ChunkProto, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
reader := bufio.NewReader(file)
decoder, err := zstd.NewReader(reader)
if err != nil {
return nil, err
}
defer decoder.Close()
data, err := io.ReadAll(decoder)
if err != nil {
return nil, err
}
var chunk pb.ChunkProto
if err := proto.Unmarshal(data, &chunk); err != nil {
return nil, err
}
return &chunk, nil
}
// Load ManifestProto từ file Zstd + Protobuf
func LoadManifestProto(path string) (*pb.ManifestProto, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
reader := bufio.NewReader(file)
decoder, err := zstd.NewReader(reader)
if err != nil {
return nil, err
}
defer decoder.Close()
data, err := io.ReadAll(decoder)
if err != nil {
return nil, err
}
var manifest pb.ManifestProto
if err := proto.Unmarshal(data, &manifest); err != nil {
return nil, err
}
return &manifest, nil
}

View File

@@ -0,0 +1,651 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.5
// protoc v4.25.6
// source: proto/firefly.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ChunkProto struct {
state protoimpl.MessageState `protogen:"open.v1"`
Assets []*AssetChunkProperty `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChunkProto) Reset() {
*x = ChunkProto{}
mi := &file_proto_firefly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChunkProto) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChunkProto) ProtoMessage() {}
func (x *ChunkProto) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChunkProto.ProtoReflect.Descriptor instead.
func (*ChunkProto) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{0}
}
func (x *ChunkProto) GetAssets() []*AssetChunkProperty {
if x != nil {
return x.Assets
}
return nil
}
type AssetChunkProperty struct {
state protoimpl.MessageState `protogen:"open.v1"`
AssetName string `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"`
AssetChunks []*AssetChunk `protobuf:"bytes,2,rep,name=asset_chunks,json=assetChunks,proto3" json:"asset_chunks,omitempty"`
AssetType int32 `protobuf:"varint,3,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
AssetSize int64 `protobuf:"varint,4,opt,name=asset_size,json=assetSize,proto3" json:"asset_size,omitempty"`
AssetHashMd5 string `protobuf:"bytes,5,opt,name=asset_hash_md5,json=assetHashMd5,proto3" json:"asset_hash_md5,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AssetChunkProperty) Reset() {
*x = AssetChunkProperty{}
mi := &file_proto_firefly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AssetChunkProperty) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetChunkProperty) ProtoMessage() {}
func (x *AssetChunkProperty) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AssetChunkProperty.ProtoReflect.Descriptor instead.
func (*AssetChunkProperty) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{1}
}
func (x *AssetChunkProperty) GetAssetName() string {
if x != nil {
return x.AssetName
}
return ""
}
func (x *AssetChunkProperty) GetAssetChunks() []*AssetChunk {
if x != nil {
return x.AssetChunks
}
return nil
}
func (x *AssetChunkProperty) GetAssetType() int32 {
if x != nil {
return x.AssetType
}
return 0
}
func (x *AssetChunkProperty) GetAssetSize() int64 {
if x != nil {
return x.AssetSize
}
return 0
}
func (x *AssetChunkProperty) GetAssetHashMd5() string {
if x != nil {
return x.AssetHashMd5
}
return ""
}
type AssetChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
ChunkName string `protobuf:"bytes,1,opt,name=chunk_name,json=chunkName,proto3" json:"chunk_name,omitempty"`
ChunkDecompressedHashMd5 string `protobuf:"bytes,2,opt,name=chunk_decompressed_hash_md5,json=chunkDecompressedHashMd5,proto3" json:"chunk_decompressed_hash_md5,omitempty"`
ChunkOnFileOffset int64 `protobuf:"varint,3,opt,name=chunk_on_file_offset,json=chunkOnFileOffset,proto3" json:"chunk_on_file_offset,omitempty"`
ChunkSize int64 `protobuf:"varint,4,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`
ChunkSizeDecompressed int64 `protobuf:"varint,5,opt,name=chunk_size_decompressed,json=chunkSizeDecompressed,proto3" json:"chunk_size_decompressed,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AssetChunk) Reset() {
*x = AssetChunk{}
mi := &file_proto_firefly_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AssetChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetChunk) ProtoMessage() {}
func (x *AssetChunk) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AssetChunk.ProtoReflect.Descriptor instead.
func (*AssetChunk) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{2}
}
func (x *AssetChunk) GetChunkName() string {
if x != nil {
return x.ChunkName
}
return ""
}
func (x *AssetChunk) GetChunkDecompressedHashMd5() string {
if x != nil {
return x.ChunkDecompressedHashMd5
}
return ""
}
func (x *AssetChunk) GetChunkOnFileOffset() int64 {
if x != nil {
return x.ChunkOnFileOffset
}
return 0
}
func (x *AssetChunk) GetChunkSize() int64 {
if x != nil {
return x.ChunkSize
}
return 0
}
func (x *AssetChunk) GetChunkSizeDecompressed() int64 {
if x != nil {
return x.ChunkSizeDecompressed
}
return 0
}
type ManifestProto struct {
state protoimpl.MessageState `protogen:"open.v1"`
Assets []*AssetManifestProperty `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ManifestProto) Reset() {
*x = ManifestProto{}
mi := &file_proto_firefly_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ManifestProto) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ManifestProto) ProtoMessage() {}
func (x *ManifestProto) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ManifestProto.ProtoReflect.Descriptor instead.
func (*ManifestProto) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{3}
}
func (x *ManifestProto) GetAssets() []*AssetManifestProperty {
if x != nil {
return x.Assets
}
return nil
}
type AssetManifestProperty struct {
state protoimpl.MessageState `protogen:"open.v1"`
AssetName string `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"`
AssetSize int64 `protobuf:"varint,2,opt,name=asset_size,json=assetSize,proto3" json:"asset_size,omitempty"`
AssetHashMd5 string `protobuf:"bytes,3,opt,name=asset_hash_md5,json=assetHashMd5,proto3" json:"asset_hash_md5,omitempty"`
AssetData *AssetManifestChunk `protobuf:"bytes,4,opt,name=asset_data,json=assetData,proto3" json:"asset_data,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AssetManifestProperty) Reset() {
*x = AssetManifestProperty{}
mi := &file_proto_firefly_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AssetManifestProperty) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetManifestProperty) ProtoMessage() {}
func (x *AssetManifestProperty) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AssetManifestProperty.ProtoReflect.Descriptor instead.
func (*AssetManifestProperty) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{4}
}
func (x *AssetManifestProperty) GetAssetName() string {
if x != nil {
return x.AssetName
}
return ""
}
func (x *AssetManifestProperty) GetAssetSize() int64 {
if x != nil {
return x.AssetSize
}
return 0
}
func (x *AssetManifestProperty) GetAssetHashMd5() string {
if x != nil {
return x.AssetHashMd5
}
return ""
}
func (x *AssetManifestProperty) GetAssetData() *AssetManifestChunk {
if x != nil {
return x.AssetData
}
return nil
}
type AssetManifestChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
LatestAssetVersion string `protobuf:"bytes,1,opt,name=latest_asset_version,json=latestAssetVersion,proto3" json:"latest_asset_version,omitempty"`
Assets []*AssetManifest `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AssetManifestChunk) Reset() {
*x = AssetManifestChunk{}
mi := &file_proto_firefly_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AssetManifestChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetManifestChunk) ProtoMessage() {}
func (x *AssetManifestChunk) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AssetManifestChunk.ProtoReflect.Descriptor instead.
func (*AssetManifestChunk) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{5}
}
func (x *AssetManifestChunk) GetLatestAssetVersion() string {
if x != nil {
return x.LatestAssetVersion
}
return ""
}
func (x *AssetManifestChunk) GetAssets() []*AssetManifest {
if x != nil {
return x.Assets
}
return nil
}
type AssetManifest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ChunkFileName string `protobuf:"bytes,1,opt,name=chunk_file_name,json=chunkFileName,proto3" json:"chunk_file_name,omitempty"`
ChunkFileVersion string `protobuf:"bytes,2,opt,name=chunk_file_version,json=chunkFileVersion,proto3" json:"chunk_file_version,omitempty"`
ChunkFileNode string `protobuf:"bytes,3,opt,name=chunk_file_node,json=chunkFileNode,proto3" json:"chunk_file_node,omitempty"`
ChunkFileSize int64 `protobuf:"varint,4,opt,name=chunk_file_size,json=chunkFileSize,proto3" json:"chunk_file_size,omitempty"`
ChunkFileMd5 string `protobuf:"bytes,5,opt,name=chunk_file_md5,json=chunkFileMd5,proto3" json:"chunk_file_md5,omitempty"`
HdiffFileInChunkOffset int64 `protobuf:"varint,6,opt,name=hdiff_file_in_chunk_offset,json=hdiffFileInChunkOffset,proto3" json:"hdiff_file_in_chunk_offset,omitempty"`
HdiffFileSize int64 `protobuf:"varint,7,opt,name=hdiff_file_size,json=hdiffFileSize,proto3" json:"hdiff_file_size,omitempty"`
OriginalFilePath string `protobuf:"bytes,8,opt,name=original_file_path,json=originalFilePath,proto3" json:"original_file_path,omitempty"`
OriginalFileSize int64 `protobuf:"varint,9,opt,name=original_file_size,json=originalFileSize,proto3" json:"original_file_size,omitempty"`
OriginalFileMd5 string `protobuf:"bytes,10,opt,name=original_file_md5,json=originalFileMd5,proto3" json:"original_file_md5,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AssetManifest) Reset() {
*x = AssetManifest{}
mi := &file_proto_firefly_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AssetManifest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetManifest) ProtoMessage() {}
func (x *AssetManifest) ProtoReflect() protoreflect.Message {
mi := &file_proto_firefly_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AssetManifest.ProtoReflect.Descriptor instead.
func (*AssetManifest) Descriptor() ([]byte, []int) {
return file_proto_firefly_proto_rawDescGZIP(), []int{6}
}
func (x *AssetManifest) GetChunkFileName() string {
if x != nil {
return x.ChunkFileName
}
return ""
}
func (x *AssetManifest) GetChunkFileVersion() string {
if x != nil {
return x.ChunkFileVersion
}
return ""
}
func (x *AssetManifest) GetChunkFileNode() string {
if x != nil {
return x.ChunkFileNode
}
return ""
}
func (x *AssetManifest) GetChunkFileSize() int64 {
if x != nil {
return x.ChunkFileSize
}
return 0
}
func (x *AssetManifest) GetChunkFileMd5() string {
if x != nil {
return x.ChunkFileMd5
}
return ""
}
func (x *AssetManifest) GetHdiffFileInChunkOffset() int64 {
if x != nil {
return x.HdiffFileInChunkOffset
}
return 0
}
func (x *AssetManifest) GetHdiffFileSize() int64 {
if x != nil {
return x.HdiffFileSize
}
return 0
}
func (x *AssetManifest) GetOriginalFilePath() string {
if x != nil {
return x.OriginalFilePath
}
return ""
}
func (x *AssetManifest) GetOriginalFileSize() int64 {
if x != nil {
return x.OriginalFileSize
}
return 0
}
func (x *AssetManifest) GetOriginalFileMd5() string {
if x != nil {
return x.OriginalFileMd5
}
return ""
}
var File_proto_firefly_proto protoreflect.FileDescriptor
var file_proto_firefly_proto_rawDesc = string([]byte{
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x22, 0x41,
0x0a, 0x0a, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x06,
0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66,
0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e,
0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74,
0x73, 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b,
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65,
0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73,
0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74,
0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x68, 0x75,
0x6e, 0x6b, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12,
0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a,
0x0e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6d, 0x64, 0x35, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x48, 0x61, 0x73, 0x68,
0x4d, 0x64, 0x35, 0x22, 0xf2, 0x01, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x68, 0x75,
0x6e, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x6d,
0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6d, 0x64, 0x35,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x44, 0x65, 0x63,
0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x48, 0x61, 0x73, 0x68, 0x4d, 0x64, 0x35,
0x12, 0x2f, 0x0a, 0x14, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c,
0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11,
0x63, 0x68, 0x75, 0x6e, 0x6b, 0x4f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65,
0x12, 0x36, 0x0a, 0x17, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x64,
0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x15, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x44, 0x65, 0x63, 0x6f,
0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x0d, 0x4d, 0x61, 0x6e, 0x69,
0x66, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x36, 0x0a, 0x06, 0x61, 0x73, 0x73,
0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x69, 0x72, 0x65,
0x66, 0x6c, 0x79, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74,
0x73, 0x22, 0xb7, 0x01, 0x0a, 0x15, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66,
0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x61,
0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73,
0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x73, 0x73,
0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x48, 0x61, 0x73, 0x68, 0x4d, 0x64, 0x35, 0x12,
0x3a, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2e, 0x41, 0x73,
0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b,
0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x76, 0x0a, 0x12, 0x41,
0x73, 0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x43, 0x68, 0x75, 0x6e,
0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x73, 0x65,
0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2e, 0x41, 0x73,
0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73,
0x65, 0x74, 0x73, 0x22, 0xc7, 0x03, 0x0a, 0x0d, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x61, 0x6e,
0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x66,
0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x63, 0x68, 0x75, 0x6e, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a,
0x12, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x75, 0x6e, 0x6b,
0x46, 0x69, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x63,
0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x4e,
0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x66, 0x69, 0x6c,
0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x68,
0x75, 0x6e, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x63,
0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x64,
0x35, 0x12, 0x3a, 0x0a, 0x1a, 0x68, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x69, 0x6e, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x68, 0x64, 0x69, 0x66, 0x66, 0x46, 0x69, 0x6c, 0x65,
0x49, 0x6e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x26, 0x0a,
0x0f, 0x68, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x68, 0x64, 0x69, 0x66, 0x66, 0x46, 0x69, 0x6c,
0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x50,
0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f,
0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a,
0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69,
0x6c, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x72,
0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x64, 0x35, 0x42, 0x0e, 0x5a,
0x0c, 0x2e, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6c, 0x79, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
file_proto_firefly_proto_rawDescOnce sync.Once
file_proto_firefly_proto_rawDescData []byte
)
func file_proto_firefly_proto_rawDescGZIP() []byte {
file_proto_firefly_proto_rawDescOnce.Do(func() {
file_proto_firefly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_firefly_proto_rawDesc), len(file_proto_firefly_proto_rawDesc)))
})
return file_proto_firefly_proto_rawDescData
}
var file_proto_firefly_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_proto_firefly_proto_goTypes = []any{
(*ChunkProto)(nil), // 0: firefly.ChunkProto
(*AssetChunkProperty)(nil), // 1: firefly.AssetChunkProperty
(*AssetChunk)(nil), // 2: firefly.AssetChunk
(*ManifestProto)(nil), // 3: firefly.ManifestProto
(*AssetManifestProperty)(nil), // 4: firefly.AssetManifestProperty
(*AssetManifestChunk)(nil), // 5: firefly.AssetManifestChunk
(*AssetManifest)(nil), // 6: firefly.AssetManifest
}
var file_proto_firefly_proto_depIdxs = []int32{
1, // 0: firefly.ChunkProto.assets:type_name -> firefly.AssetChunkProperty
2, // 1: firefly.AssetChunkProperty.asset_chunks:type_name -> firefly.AssetChunk
4, // 2: firefly.ManifestProto.assets:type_name -> firefly.AssetManifestProperty
5, // 3: firefly.AssetManifestProperty.asset_data:type_name -> firefly.AssetManifestChunk
6, // 4: firefly.AssetManifestChunk.assets:type_name -> firefly.AssetManifest
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_proto_firefly_proto_init() }
func file_proto_firefly_proto_init() {
if File_proto_firefly_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_firefly_proto_rawDesc), len(file_proto_firefly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_firefly_proto_goTypes,
DependencyIndexes: file_proto_firefly_proto_depIdxs,
MessageInfos: file_proto_firefly_proto_msgTypes,
}.Build()
File_proto_firefly_proto = out.File
file_proto_firefly_proto_goTypes = nil
file_proto_firefly_proto_depIdxs = nil
}