Class: VCDIFF::VCDIFFWindow

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/vcdiff/records.rb

Instance Method Summary collapse

Instance Method Details

#compressed_only?Boolean

If VCD_SOURCE and VCD_TARGET are both 0, then the target file was compressed by itself.

Returns:

  • (Boolean)


79
80
81
# File 'lib/vcdiff/records.rb', line 79

def compressed_only?
  !source_data? && !target_data?
end

#source_data?Boolean

Returns true if VCD_SOURCE is set

Returns:

  • (Boolean)


68
69
70
# File 'lib/vcdiff/records.rb', line 68

def source_data?
  window_indicator[0] == 1
end

#target_data?Boolean

Returns true if VCD_TARGET is set

Returns:

  • (Boolean)


73
74
75
# File 'lib/vcdiff/records.rb', line 73

def target_data?
  window_indicator[1] == 1
end