struct Chem::DCD::Encoding

Overview

Binary encoding for reading DCD content.

Defined in:

chem/formats/dcd.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(byte_format : IO::ByteFormat, marker_type : Int32.class | Int64.class) #

[View source]

Instance Method Detail

def byte_format : IO::ByteFormat #

Byte order (big or little endian) of the DCD content.


[View source]
def marker_type : Int32.class | Int64.class #

Type of the block marker (32 or 64 bits).


[View source]
def read(io : IO, type : T.class) : T forall T #

Reads a value of the given type from io using the byte format.


[View source]
def read_marker(io : IO) : Int32 | Int64 #

Reads a block marker from io.


[View source]