#ci #binary-file #binary-data #tool

app binmult

Copy and append content from raw data files without mutating any contents

2 unstable releases

0.2.0 Dec 28, 2023
0.1.0 Jul 8, 2023

#2563 in Command line utilities

MIT/Apache

7KB
76 lines

example workflow rust-badge Crates.io issues-badge pr-badge stars-badge forks-bade GitHub commit activity (branch)

binmult - Binary File Multiplier

Copy and append content from raw data files without mutating any contents

Purpose

Stop me from banging my head against the wall that is my ineffecient shell scripts.

Efficient and easy way of duplicating the contents of a small binary file, and writing that duplicated content to a new file.

Why?

Good for certain CI pipelines where regression testing for performance is required, but downloading large external files is impractical.

This is certainly possible in a simple shell script, but making a 240 byte file into a 1 GB file is painfully slow in bash, and I couldn't figure out how to make it faster while keeping the contents intact.

Quickstart

See help

$ binmult --help

Duplicate a file up to the closest (rounded down) multiple of 100 MiB

# Any size input duplicated up to 100 MiB (rounded down)
$ binmult input.raw --size 100 -o out.raw

Joke

Jokes Card

Dependencies

~1.1–1.7MB
~32K SLoC