PRISTINE-BZ2(1)

πŸ’– PRISTINE-BZ2 πŸ’–

okay bestie, welcome to pristine-bz2 β€” the little helper that regenerates pristine bz2 files ✨ (yes, "pristine" like brand new, untouched, immaculate, main character energy πŸ’…)


✨ SYNOPSIS ✨

pristine-bz2 [OPTIONS] gendelta file.bz2 delta

pristine-bz2 [OPTIONS] genbz2 delta file

two modes, two moods, both iconic 🫢


🌸 DESCRIPTION 🌸

so basically this is a complement to the pristine-tar(1) command. and no, you normally don't need to run it by hand β€” pristine-tar calls it whenever it needs to handle .tar.bz2 files. it's giving "backstage crew" energy, honestly. the star of the show never thanks them but the whole thing falls apart without them 😭

pristine-bz2 gendelta takes the bz2 file you point it at, and generates a small binary delta file that can later be used by pristine-bz2 genbz2 to recreate the original file. tiny file, big responsibilities ✨

pristine-bz2 genbz2 takes that delta file you made, and compresses the input file you give it (which must be identical to the contents of the original bz2 file, no cap, don't try to be slick). the resulting file will be identical to the original gz file used to create the delta πŸ’š

the whole approach to regenerating the original bz2 file is: figure out how it was produced in the first place. specifically β€”

  • what compression level was used
  • whether it was built with bzip2(1) or with pbzip2(1)

it's giving detective work πŸ” but make it compression.

side note bestie: other tools exist, like bzip2smp or dbzip2, but they're said to be bit-identical with bzip2. anyway, bzip2 looks like the most widespread implementation, so it's genuinely hard to find bzip2 files that make pristine-bz2 fail. so if you find one β€” please report! πŸ“’

also, the deprecated bzip1 compression method hasn't been implemented. rip bzip1, you will not be missed πŸͺ¦

and one last thing: if the delta filename is -, then pristine-bz2 reads or writes it to stdio. cute, right? πŸŽ€


πŸŽ€ OPTIONS πŸŽ€

  • -v β€” verbose mode, bestie. it shows you each command that is run. it's giving "narrator voice" ✨
  • -d β€” debug mode. for when you need to know everything, all at once, no filter πŸ™ˆ
  • -k β€” don't clean up the temporary directory on exit. it's a little messy, a little hoarder-coded, but sometimes you just need to keep the receipts πŸ’…
  • -t β€” try harder to determine how to generate deltas of difficult bz2 files. effort mode: activated πŸ’ͺ

πŸ¦‹ ENVIRONMENT πŸ¦‹

  • TMPDIR β€” specifies a location to place temporary files, other than the default. it's the "where do i put my stuff" setting, but make it official 🌸

πŸ‘‘ AUTHOR πŸ‘‘

  • Joey Hess <joeyh@debian.org>
  • Faidon Liambotis <paravoid@debian.org>
  • Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>

Licensed under the GPL, version 2. slay, legally speaking βš–οΈβœ¨


and that's the whole vibe, bestie! this page came to you courtesy of perl v5.38.2 and is dated 2024-04-01. go regenerate something pristine, you absolute icon πŸ«ΆπŸ’–

πŸ“¦ where this page comes from