3
7
Fork
You've already forked oci
2

introduce gzip compression levels fastest, default, best #4

Closed
dasimmet wants to merge 0 commits from compression-levels into main
pull from: compression-levels
merge into: jeffective:main
jeffective:main
jeffective:zig-0.17.X
jeffective:feature/pull-image
jeffective:feature/output-oci-dir
jeffective:feature/hash-final-manifest
jeffective:feature/parse-archive
jeffective:compression-levels-enum
Collaborator
Copy link

@jeffective what do you think about introducing compression levels?
1-9 seems a bit overkill, but maybe just 3 levels?

@jeffective what do you think about introducing compression levels? 1-9 seems a bit overkill, but maybe just 3 levels?

I think we can provide union that exposes all the compression options, and perhaps rename .raw to .none?

I think we can provide union that exposes all the compression options, and perhaps rename `.raw` to `.none`?

If the gzip standard people thought 1-9 was useful and the oci standard people thought gzip was good, who am I to argue with it?

If the gzip standard people thought 1-9 was useful and the oci standard people thought gzip was good, who am I to argue with it?

I can see that it might make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called makeFn. Not sure how they would but we might consider change from our existing exectuable approach to that?

I can see that it might make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called `makeFn`. Not sure how they would but we might consider change from our existing exectuable approach to that?
Author
Collaborator
Copy link

@jeffective wrote in #4 (comment):

I can see that is light make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called makeFn. Not sure how they would but we might consider change from our existing exectuable approach to that?

well the "interface" of zigs build system is that in build.zig the data structures of the graph are produced, and then the makeFn is executed afterwards by the build runner and receives the datastructure, hashes all inputs to calculate cache hits & misses, and in case of a miss runs the build.

There's plans to sandbox "build.zig" and then custom "makeFn" might not work anymore. i think the exe approach is more futureproof, but at some point i'd reconsider to create a single binary for all create_ subcommands, because it saves intermediate build steps and disk space.

For building the graph from oci as a dependency, i can try creating another branch with a proof of concept in the "example" subdir if you want

@jeffective wrote in https://codeberg.org/jeffective/oci/pulls/4#issuecomment-9125259: > I can see that is light make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called `makeFn`. Not sure how they would but we might consider change from our existing exectuable approach to that? well the "interface" of zigs build system is that in build.zig the data structures of the graph are produced, and then the makeFn is executed afterwards by the build runner and receives the datastructure, hashes all inputs to calculate cache hits & misses, and in case of a miss runs the build. There's plans to sandbox "build.zig" and then custom "makeFn" might not work anymore. i think the exe approach is more futureproof, but at some point i'd reconsider to create a single binary for all create_ subcommands, because it saves intermediate build steps and disk space. For building the graph from oci as a dependency, i can try creating another branch with a proof of concept in the "example" subdir if you want
Author
Collaborator
Copy link

@jeffective wrote in #4 (comment):

I can see that it might make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called makeFn. Not sure how they would but we might consider change from our existing exectuable approach to that?

also i think the build runner running "makeFn" is always compiled in debug mode, and the compression is a lot faster with release optimizations, which should be the default at some point.

@jeffective wrote in https://codeberg.org/jeffective/oci/pulls/4#issuecomment-9125259: > I can see that it might make the cli parser annoying for the steps, I don't fully understand it but there are these things in the existing zig build system called `makeFn`. Not sure how they would but we might consider change from our existing exectuable approach to that? also i think the build runner running "makeFn" is always compiled in debug mode, and the compression is a lot faster with release optimizations, which should be the default at some point.
dasimmet force-pushed compression-levels from e7e4252435 to bb9b24ea94 2025年12月23日 09:45:05 +01:00 Compare
dasimmet closed this pull request 2026年01月24日 09:57:58 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jeffective/oci!4
Reference in a new issue
jeffective/oci
No description provided.
Delete branch "compression-levels"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?