Languages
[Edit]
EN

JavaScript - encode text to base64 using stream

19 points
Created by:
Root-ssh
178170

In this short article, we would like to show how in JavaScriptencode some text to base 64 using a simple stream logic.

Encoding in-stream is useful when we have a big amount of text that should be encoded (in some parts) reducing memory usage that is needed when btoa() is called with big text as an argument.

Stream is useful when we transmit real-time produced text and we don't know the final length.

Practical example:

See also

Edit
  1. JavaScript - decode base64 to text using stream 
  2. JavaScript - Base64 encode and decode

  3. JavaScript - base64 with Unicode support

  4. JavaScript - convert string to Base64

  5. JavaScript - convert blob to base64

Alternative titles

  1. JavaScript - encode text to base 64 using stream
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join