def olecf_header_pad_size(node=None, parent=None, attr_index=None, rawdata=
    None, new_value=None, **kwargs):
    """Size getter for the getting the byte size of the header padding."""
    if new_value is None:
        if 'sector_shift' in kwargs:
            return max(0, (1 << kwargs['sector_shift']) - 512)
        try:
            return max(0, (1 << parent.header.sector_shift) - 512)
        except AttributeError:
            return 0
