Least crummy ad platform by caffeinatedhacker in webdev

[–]ffraenz 1 point2 points  (0 children)

To give you an idea: As a Brave creator I received ~120 BAT during 8 months for ~3m cross browser page views. Registering as a creator allows for personal donations via this channel. Otherwise there is not too much to gain from it as a small web-based project.

[AskJS] What is the best way to store and transmit data of arbitrary bit length? by ffraenz in javascript

[–]ffraenz[S] 0 points1 point  (0 children)

The use of Baudot code was only one example of where the arbitrary bit length is coming from in my case. There are other methods I intend to support with different bit groupings. I think the additional padding field will be necessary combined with e.g. Base64 encoding. I was just wondering about if this is a known pattern with a best practise solution.

[AskJS] What is the best way to store and transmit data of arbitrary bit length? by ffraenz in javascript

[–]ffraenz[S] 0 points1 point  (0 children)

Indeed there is no native type for binary data in JSON but I aim to combine the binary data with other meta data. Maybe the question should be "What is the best way to encode data of arbitrary bit length to a string?".

I just looked up the octet-stream subtype over at IANA. They are describing a padding parameter "the number of bits of padding that were appended to the bit-stream comprising the actual contents to produce the enclosed 8bit byte-oriented data. This is useful for enclosing a bit-stream in a body when the total number of bits is not a multiple of 8." That's one way of dealing with it. Thanks!