joyent/node — pull request #7596 by yorkie (2014-05-10 16:08:52+00:00)
Title: buffer: add 24-bit operators for buffer module

Some of APIs of `Buffer` what I added listed below:

* `buf.read24UIntLE(offset, noAssert)`

* `buf.read24UIntBE(offset, noAssert)`

* `buf.read24IntLE(offset, noAssert)`

* `buf.read24IntBE(offset, noAssert)`

* `buf.write24UIntLE(value, offset, noAssert)`

* `buf.write24UIntBE(value, offset, noAssert)`

* `buf.write24IntLE(value, offset, noAssert)`

* `buf.write24IntBE(value, offset, noAssert)`

See: http://tools.ietf.org/html/rfc5246#section-7.4
In this spec or other protocols, `uint24` type is often used then these API would simplify related protocols implementation.