Class: Zip64::CDFileHeader

Inherits:
Block
  • Object
show all
Defined in:
lib/zip64/structures.rb

Constant Summary collapse

SIG =
0x02014b50

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Block

base_size, #describe, #fields, fields, #initialize, #pack_field, #read_field_from, read_from, #size, size_of, #size_of

Constructor Details

This class inherits a constructor from Block

Instance Attribute Details

#extra_fieldObject

Returns the value of attribute extra_field.



257
258
259
# File 'lib/zip64/structures.rb', line 257

def extra_field
  @extra_field
end

#file_commentObject

Returns the value of attribute file_comment.



257
258
259
# File 'lib/zip64/structures.rb', line 257

def file_comment
  @file_comment
end

#filenameObject

Returns the value of attribute filename.



257
258
259
# File 'lib/zip64/structures.rb', line 257

def filename
  @filename
end

Instance Method Details

#to_stringObject



258
259
260
# File 'lib/zip64/structures.rb', line 258

def to_string
	super + "#{@filename}#{extra_field}#{file_comment}"
end

#versionObject



253
254
255
# File 'lib/zip64/structures.rb', line 253

def version
	zip64? ? 45 : 10
end

#zip64?Boolean

Returns:

  • (Boolean)


249
250
251
# File 'lib/zip64/structures.rb', line 249

def zip64?
	data_len == LEN64 && raw_data_len == LEN64
end