Skip to content

CramBL/binary_file_multiplier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages