Code Monkey home page Code Monkey logo

base91's Introduction

BasE91 with (safe) r'lyeh modification of standard alphabet. This implementation is friendly for json/xml. I use calculating of encoding text size and reserve it in capacity of input string.


Pros and cons of using Base91

Joachim Henke created the base91 binary-to-text encoding technique, often known as basE91. The binary data stream is split into 13-bit packets, which are subsequently encoded as two ASCII characters[2]. In general, the size of the encoded data will be 316 times bigger than the original, assuming eight bits per ASCII character. This is more effective than base85's 14 increase and base64's 13 increase (which utilizes four characters to represent three bytes of data) (which uses five characters to represent four bytes of data).

Advantages

  1. Compared to base85, conversion is quick. Due to the packet's tiny size, a lookup table can be used instead of division or multiplication during encoding and decoding. Base85 would need a 232 lookup table of 5 bytes, which would need at least 5 GiB of RAM if implemented.
  2. The overhead is only 23% compared to base64, which drops to 14% for 0-byte blocks.
  3. Because backslash and single quotes are not utilized, many programming languages make it simple to quote.

Disadvantages

  1. Slower encoding and decoding than base64
  2. Binary Coded Decimal is a type of binary encoding that uses 4 binary numbers to represent the 10 digits from 0 to 9 in a decimal number.

Solved problem of challenging to utilize in double-quoted strings without escape characters or raw string because of the use $ and " in the digit alphabet.

base91's People

Contributors

wecand0 avatar

Watchers

 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.