Method: CHD#header

Defined in:
ext/chd.c

#headerHash{Symbol => Object}

Return the CHD header.

The header contains information about:

* version
*  compression used
*  digest (sha1 or md5) for the file and the parent
* hunk and unit (size and count)

Returns:

  • (Hash{Symbol => Object})


580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'ext/chd.c', line 580

static VALUE
chd_m_header(VALUE self) {
    // Retrieve typed data
    struct chd_rb_data *chd;
    chd_rb_get_typeddata(chd, self);
    chd_rb_ensure_initialized(chd);
    chd_rb_ensure_opened(chd);
    
    if (NIL_P(chd->value.header)) {
	chd->value.header = rb_obj_freeze(chd_rb_header(chd->header));
    }

    return chd->value.header;
}