Update README.md
Boris K kubiakboris@gmail.com
Tue, 18 Feb 2020 11:39:40 +0100
1 files changed,
17 insertions(+),
8 deletions(-)
jump to
M
README.md
→
README.md
@@ -1,9 +1,18 @@
-- https://github.com/dracula/prism -- https://github.com/LzmaMin-JS/LzmaMin-JS -- https://github.com/PrismJS/prism -- https://github.com/kazzkiq/CodeFlask +# Paste + +Paste is a client-side paste service which works **without any database** or back-end code + +Instead, the data is **compressed** then **stored** into a unique URL that can be decoded later. For example, [this is the HTML code of the service][example] + +> **Note:** This project is a clone of [Topaz's paste service][topaz-example], with a reworked design and additional features such as syntax highlighting, line numbers, and more + +## How it works + +When you click on "Generate Link", the whole text is compressed using the [LZMA algorithm](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm), encoded in [Base64](https://en.wikipedia.org/wiki/Base64), and put in the optional fragment at the end of the URL: `bokub.github.io/paste/#<data is here>` + +When you open a link which contains data, the fragment is decoded, decompressed, and displayed in the editor -```sh -# Format code -npx prettier --write --single-quote --tab-width=4 --print-width=120 index.js *.{html,css,md} -``` +[Format code]: # ( npx prettier --write --single-quote --tab-width=4 --print-width=120 index.js *.{html,css,md} ) + +[example]: https://bokub.github.io/paste/?lang=HTML#XQAAAQBDBwAAAAAAAAAeCEUG0O+oKBdZ2an16qclPsVsA9xArjEo+v7wdal3Am1AsLdXzw9L86kFJA/HP3aMP31FQJprZ5BJcObQ9gG2mgk/o5ash0rBKVbyUAKaYDis7d4edb3x84EDgAqgJKRMcakcJsfTA+uQObpFvFBj4JdsawhToiw1f3rTDRF0BzhxihlMCqxRYKFQb7lOgjWPhG5X0YrIEDYqhOsPidFI+jXGLFay7Q18DShtXbTtor7HAiKD/vYrV4EftOwEhIx+9v4QNwZnLSwUscY6W6QcwG/FkV1J8/Q8a4v7E2U0yyVaWb4RXDsy2idMYak/KABWGc3fqB1PkyeWIgrSydSjnfP7ywvJA/zDwk9M1SMpFi1ick30SSbtx03xRhuH5Rd+DVIe5ZyS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