class Crow::Encoder

Defined in:

libcrow/Encoder.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(destio : IO) #

[View source]

Class Method Detail

def self.zigzag_encode32(n : Int32) : UInt32 #

[View source]
def self.zigzag_encode64(n : Int64) : UInt64 #

[View source]

Instance Method Detail

def end_set #

return setid


[View source]
def put(value, fieldId : UInt32, fieldSubId : UInt32 = 0_u32) #

put a field value, defining by id


[View source]
def put(value, fieldId : Int32, fieldSubId : Int32 = 0) #

[View source]
def put(value, fieldName : String) #

[View source]
def put(value, fld : Field) #

[View source]
def put_flags(value : UInt8) #

ignores bits 3-7, encodes bits 0-2 to output stream


[View source]
def put_row_sep(flags : UInt8 = 0_u8) #

[View source]
def put_set(setid : UInt8, flags : UInt8 = 0_u8) #

[View source]
def start_set #

[View source]
def typeid_of(value) #

[View source]
def write_field_info(fld : Field) #

write FIELDINFO data

TFIELDINFO index | 0x80 if have subid typeid | 0x80 if have name id subid namelen name bytes


[View source]
def write_field_tag(fld : Field, io) #

[View source]
def write_fixed32(n : UInt32) #

[View source]
def write_fixed64(n : UInt64) #

[View source]
def write_value(value : String, curField : Field, io) #

[View source]
def write_value(value : Bytes | Array(UInt8), curField : Field, io) #

[View source]
def write_value(value : Bool, curField, io) #

[View source]
def write_value(value, curField, io) #

[View source]
def write_varint(rawval, io = nil) #

[View source]