Giter Site home page Giter Site logo

byebyte's Introduction

byebyte - destroy your files in the name of art

What?

byebyte is a command line tool written in Node.js that replaces random bytes in a file with random values.

Why would I want to do that?

Because you like glitch art or you just need to destroy arbitrary data in a file for some reason while leaving most of it intact. Potential uses:

  • Destroying various image files
  • Glitching video files
  • Randomizing text files
  • Breaking your essay file so that your teacher can't open it and you get your deadline extended

How?

You'll need Node.js to run this file, so you need that installed first. You'll also need to learn how to use a command line. Once you have Node, you can install byebyte pretty easily:

npm install -g byebyte

You're set up! Now you can run byebyte like this:

byebyte -f <inputfile> -o <outputfile> [more options]

For example, if you wanted to destroy a text file, you would run:

byebyte -f poem.txt -o newpoem.txt

This short little poem:

Little Baby

Little baby Oh so small 
One day you will be big and tall
I watch you while you laugh and play 
My love for you grows everyday 
I tell you this with my whole heart
I love you just the way you are

becomes:

Little Baby

Little baby Oh ±oDsmall 
2neHdayàyou wi�l be2digJañd�tall
� watch�youìw°ile9you l³ugh and play 
My lo�e f�r*you õrHws everydayB
‚ tell youÖt³is with myäÏhole�heart
I Zove óou just the way you are

Parameters

parameter meaning default
-f, --file input file path none, required
-o, --out output file path none, required
-t, --times number of bytes to replace 50
--min (real number, 0.0 - 1.0) - the lower bound of the file to replace bytes in. you might use this to avoid corrupting the header of a file, rendering it unopenable 0.1
--max (real number, 0.0 - 1.0) - the upper bound of the file to replace bytes in. you might use this to avoid corrupting the footer of a file, rendering it unopenable 0.9
-c, --continuous if set to true, this will randomly decide to replace the next byte after the last one was replaced. you might do this to get "runs" of replaced bytes in a row instead of just scattered, randomly replaced pixels true
-C, --continuousChance (real number, 0.0 - 1.0) the chance, in decimal format, of the next byte being continuous. 0.6 = 60%, 0.2 = 20%, etc. 0.6

Examples?

You betcha!

jpg

Here's the byebyte "logo" after running it through byebyte:

node index.js -f byebyte.jpg -o byebytebroke.jpg -t 100

We can even do it again:

bmp

Here's a panda:

Here's the command:

node index.js -f byebyte.jpg -o byebytebroke.jpg -t 13000

Here's the result:

BMPs have really simplistic data, so breaking them doesn't do a ton.

video

Here's a cool, comforting video: find comfort in the light. // full moon timelapse

Here's the end example of my destroying parts of it and exporting a single part from the destroyed video as a GIF:

Here's the full result of the piece I made:

This is awesome

Yeah? I'm glad you said so, because I happen to have a whole bunch of glitch art resources on my personal website/newsletter Glitchet, not to mention a pretty kickass Facebook page and Tumblr. Feel free to send any feedback / questions to [email protected].

byebyte's People

Contributors

wayspurrchen avatar

Watchers

James Cloos avatar Abdullah  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.