Base64 and Binary module

I made two modules a while back
One module can convert text from base64 and to base64 and the other can manipulate binary numbers

the Base64 one is just :encode and :decode

The binary one has a lot
:get_bit_count
:from_decimal
:to_decimal
:from_string
:to_string
:reverse_bits
:insert_bit
:set_bit
:get_bit
and
:remove_bit

base64.rbxm (2.2 KB)

Feedback will be appreciated

3 Likes

Use a buffer and increase the throughput

1 Like

get bit count = 32 - bit32.countlz(num)
from decimal is too slow
to decimal = tonumber(num,2)
to_string can use buffers
get bit = bit32.extract
set bit = bit32.replace

2 Likes