pack / unpack
kachick opened this issue ยท 3 comments
I'm not very good at pack/unpack code.
When using them, encoding/decoding might be fast?
I couldn't find the way, and I don't want to take it even if it makes bit faster... ๐
https://bugs.ruby-lang.org/issues/18254 ๐ Ruby 3.1 got offset...
When using them, we should have array for the ivar instead of current integer. It is negative for me. (Ruby does not have Bytes as crystal for now) ๐ค
https://github.com/ruby/ruby/blob/11336c7ddb81b619842eed2a9c5a49a5361df24e/pack.rb
https://docs.ruby-lang.org/ja/latest/class/String.html#I_BYTES
https://docs.ruby-lang.org/ja/latest/doc/pack_template.html
https://docs.ruby-lang.org/ja/latest/method/String/i/unpack.html
https://www.bigbinary.com/blog/ruby-pack-unpack
http://www.ajisaba.net/rails/binary.html
https://stackoverflow.com/questions/20179850/ruby-string-of-bytes-to-array-of-integers
๐คทโโ๏ธ