Skip to content
Snippets Groups Projects
Commit a538f35e authored by Thomas Wilks's avatar Thomas Wilks
Browse files

feat: added compression level support

parent b9e32e80
No related branches found
No related tags found
1 merge request!8feat: added compression level support
......@@ -6,6 +6,7 @@ DOC = """Compresses a file with the Burrows-Wheeler (`bzip2`) algorithm.
bzip2_compress(
name = "compress",
src = "some/file.txt",
level = 1-9,
)
```
"""
......@@ -16,6 +17,12 @@ ATTRS = {
mandatory = True,
allow_single_file = True,
),
"level": attr.int(
doc = "The compression level.",
mandatory = False,
default = 5,
values = [l for l in range(1, 10)],
),
"_template": attr.label(
default = "@rules_coreutils//coreutils/redirect:stdout",
allow_single_file = True,
......@@ -40,6 +47,7 @@ def implementation(ctx):
args = ctx.actions.args()
args.add(bzip2.executable.path)
args.add("-czfk").add(ctx.file.src)
args.add("-{}".format(ctx.attr.level))
ctx.actions.run(
outputs = [output],
......
......@@ -10714,7 +10714,7 @@
"moduleExtensions": {
"@@ape~1.0.0-beta.6//:MODULE.bazel%_repo_rules": {
"general": {
"bzlTransitiveDigest": "7dmOqqm4azSAaOhBklUWLfQ6Db4qFiDpOgYBZF3yvig=",
"bzlTransitiveDigest": "WUdXC90lZZSXHYtKyCMn3+hL9HDr0CmF+mN296XUkf4=",
"accumulatedFileDigests": {},
"envVariables": {},
"generatedRepoSpecs": {
......
  • Congregate Migrate @congregate_migrate

    mentioned in commit b337b954

    By Ghost User on 2024-08-12T14:43:12

    · Imported

    mentioned in commit b337b954

    By Ghost User on 2024-08-12T14:43:12

    Toggle commit list
  • Congregate Migrate @congregate_migrate

    mentioned in commit b608638e

    By GITLAB_TOKEN on 2025-02-13T10:45:34

    · Imported

    mentioned in commit b608638e

    By GITLAB_TOKEN on 2025-02-13T10:45:34

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment