Skip to content

Instantly share code, notes, and snippets.

@amcginlay
Last active October 30, 2019 17:14
Show Gist options
  • Save amcginlay/8f2e910225397c627b729f02c84d704d to your computer and use it in GitHub Desktop.
Save amcginlay/8f2e910225397c627b729f02c84d704d to your computer and use it in GitHub Desktop.
Serialization and compression demo
echo "Alan" | base64 | base64 --decode
convert -size 2560x1600 canvas:red ~/tx.png # reaquires imagemagick
find . -maxdepth 1 -type f -name '*x.png*' -exec ls -l {} \;
base64 ~/tx.png > ~/tx.png.b64
zip ~/tx.png.b64.zip ~/tx.png.b64
cp ~/tx.png.b64.zip ~/rx.png.b64.zip
unzip -p ~/rx.png.b64.zip > ~/rx.png.b64
base64 --input ~/rx.png.b64 --output ~/rx.png --decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment