Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1230

How to store binary data (in the form of 0s and 1s) as a set of 8 0s and 1s as 1 byte each into a file

$
0
0

I have a string of 0s and 1s. I want to take groups of 8 of these digits and assume them as a single byte and write it into a file to save as much space as possible. How should I encode this so that each group of binary string takes exactly 1 byte

I have tried using utf-8 and utf-16 ASCII but I am not able to successfully convert string to encoded characters


Viewing all articles
Browse latest Browse all 1230

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>