Split reader into metadata/assets
This commit is contained in:
+12
-29
@@ -25,37 +25,20 @@ main :: proc() {
|
||||
w := chunks.writer_init(cast(u64)len(entries))
|
||||
defer chunks.writer_destroy(&w)
|
||||
|
||||
// chunks.write_assets(
|
||||
// &w,
|
||||
// opts.output,
|
||||
// entries[:],
|
||||
// opts.size,
|
||||
// opts.compression,
|
||||
// )
|
||||
//
|
||||
// chunks.write_metadata(
|
||||
// &w,
|
||||
// opts.output,
|
||||
// entries[:],
|
||||
// opts.size,
|
||||
// opts.compression,
|
||||
// )
|
||||
|
||||
header, err := chunks.read_header_by_path("./build/CHUNK0")
|
||||
chunk0, o_err := os.open("./build/CHUNK0")
|
||||
asset_index, a_err := chunks.read_asset_index(chunk0, header)
|
||||
fmt.println(
|
||||
"found: ",
|
||||
chunks.file_exists(header, asset_index, "not_exists"),
|
||||
)
|
||||
fmt.println(
|
||||
"found: ",
|
||||
chunks.file_exists(header, asset_index, "./toby/engage"),
|
||||
chunks.write_assets(
|
||||
&w,
|
||||
opts.output,
|
||||
entries[:],
|
||||
opts.size,
|
||||
opts.compression,
|
||||
)
|
||||
|
||||
fmt.printf(
|
||||
"file: %c\n",
|
||||
chunks.read_file(header, asset_index, opts.output, "./toby/engage"),
|
||||
chunks.write_metadata(
|
||||
&w,
|
||||
opts.output,
|
||||
entries[:],
|
||||
opts.size,
|
||||
opts.compression,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user