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.



255
256
257
# File 'lib/zip64/structures.rb', line 255

def extra_field
  @extra_field
end

#file_commentObject

Returns the value of attribute file_comment.



255
256
257
# File 'lib/zip64/structures.rb', line 255

def file_comment
  @file_comment
end

#filenameObject

Returns the value of attribute filename.



255
256
257
# File 'lib/zip64/structures.rb', line 255

def filename
  @filename
end

Instance Method Details

#to_stringObject



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

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

#versionObject



251
252
253
# File 'lib/zip64/structures.rb', line 251

def version
	zip64? ? 45 : 10
end

#zip64?Boolean

Returns:

  • (Boolean)


247
248
249
# File 'lib/zip64/structures.rb', line 247

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