PackStruct (Class)

In: packstruct.rb
Parent: Object

A structure class, to interface with C-style binary interfaces. You can think of it as a custom marshal, in a way.

Released under Ruby’s license.

© Aredridel <aredridel@nbtsc.org>

Methods

content_length   field   fields   pack   to_s   types   unpack   unpack  

Public Class methods

define a field in the structure

unpack a structure from a binary string, consuming the characters.

Public Instance methods

The binary length of the structure.

The fields in this structure (not including inherited fields)

Pack the structure into its binary form and return as a string.

An alias for pack

The types corresponding to the fields in this structure (not including inherited fields)

unpack a structure from a binary string into the current instance, consuming the characters.

[Validate]