README.md (view raw)
1[![Intro](https://github.com/bokub/paste/raw/images/intro.png)][intro-img]
2
3> Paste is available at [`bokub.github.io/paste`](https://bokub.github.io/paste) ⚡
4
5Paste is a client-side paste service which works **without any database** or back-end code
6
7Instead, 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]
8
9As a result, there is no risk of data being lost or deleted. Nobody will ever be able to read your data unless you give them the link
10
11> **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
12
13
14## How it works
15
16When 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>`
17
18When you open a link which contains data, the fragment is decoded, decompressed, and displayed in the editor
19
20
21## Embedded Paste snippets
22
23You can include code snippets into your own website by clicking the _Embed_ button and using the generated HTML code
24
25[This is what an embedded Paste snippet looks like](https://jsfiddle.net/bokub/nwtcdrph/show)
26
27Feel free to edit the generated `height` and `width` attributes so they suit your needs
28
29[intro-img]: https://bokub.github.io/paste/?lang=python#XQAAAQBAAwAAAAAAAAAFYH9Ev4Ly6z/HjSL9A25RBz0bkd1tSahYhX4hPnzQ0/4mR2bSHR+DYlQzBmjK5Pf8qtSY95RpMhLlPaFIgxWdmDCvjn78eJJBPIAptv2ZfAqHq/9h2ppe7XXLit9Ia5ip17plAs0BpQFZuqXAdMVascQlCUQvZ8Kh+yfSI0NxZ6LH0iGlTmdC//9/93OA
30[example]: https://bokub.github.io/paste/?lang=html#XQAAAQBICQAAAAAAAAAeCEUG0O+oKBdZ2an16qclPsVsA9xArjEo+v7wdal3Am1AsLdXzw9L86kFJA/HP3aMP31FQJprZ5BJcObQ9gG2mgk/o5ash0rBKVbyUAKaYDis7d4edb3x84EDgAqgJKRMcakcJsfTA+uQObpFvFBj4JdsawhToiw1f3r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