Skip to content

Latest commit

 

History

History
55 lines (27 loc) · 1.16 KB

NOTES.md

File metadata and controls

55 lines (27 loc) · 1.16 KB

Notes on Bits 'n' Bytes

Buffer classes in ruby

open naming questions?

use Buffer as an alias for Bytes | ByteArray or StringBuffer ?

or use Bytes for immutable ByteArrays and Buffer for mutable ByteArrays ????

class StringIO

StringIO is really like a StringBuffer with file-like read/write access

class IO::Buffer

see https://ruby-doc.org/core-3.1.2/IO/Buffer.html

class OpenSSL::Buffering::Buffer

see https://docs.ruby-lang.org/en/master/OpenSSL/Buffering/Buffer.html

More

arraybuffer gem

ByteBuffer in nio4r gem

Buffer in FFI gem

In other languages

  • see python - uses string and bytes (immutable) and bytearray (mutable)
  • see Buffer in node.js