From 9264abce08bf88d423f113fb097865f4ddf12a07 Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Thu, 26 Jul 2018 15:33:06 -0500 Subject: [PATCH] ReadMe: Node script for encoding https://runkit.com/hesygolu/site-gen-script --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e969b10..4a92c86 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ Encoding (Python) `base64.b64encode(lzma.compress(bytes("hello world",encoding="utf-8"), format=lzma.FORMAT_ALONE, preset=9))` +Encoding (Node.js) + +`'https://itty.bitty.site/#/'+Buffer.from(require("lzma").compress("Hello World", 9)).toString('base64')` + Decoding (Mac) `echo -n "[URL]" | sed -E 's/^.*#[^\/]*\/\??//g' | base64 -D | lzma -d ` @@ -49,6 +53,6 @@ Decoding (Linux) `echo -n "[URL]" | sed -E 's/^.*#[^\/]*\/\??//g' | base64 -d | lzma -d` -Decoding (Win) +Decoding (Win Git/WSL) `echo -n "[URL]" | sed 's/^.*#[^\/]*\///g' | base64 -d | xz --format=lzma -d`