Class: Omnizip::Formats::SevenZip::Models::StreamInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/omnizip/formats/seven_zip/models/stream_info.rb

Overview

Represents stream information in .7z format Contains packed streams, folders, and unpacked stream metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStreamInfo

Initialize stream info



15
16
17
18
19
20
21
22
23
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 15

def initialize
  @pack_pos = 0
  @pack_sizes = []
  @pack_crcs = []
  @folders = []
  @num_unpack_streams_in_folders = []
  @unpack_sizes = []
  @digests = []
end

Instance Attribute Details

#digestsObject

Returns the value of attribute digests.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def digests
  @digests
end

#foldersObject

Returns the value of attribute folders.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def folders
  @folders
end

#num_unpack_streams_in_foldersObject

Returns the value of attribute num_unpack_streams_in_folders.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def num_unpack_streams_in_folders
  @num_unpack_streams_in_folders
end

#pack_crcsObject

Returns the value of attribute pack_crcs.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def pack_crcs
  @pack_crcs
end

#pack_posObject

Returns the value of attribute pack_pos.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def pack_pos
  @pack_pos
end

#pack_sizesObject

Returns the value of attribute pack_sizes.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def pack_sizes
  @pack_sizes
end

#unpack_sizesObject

Returns the value of attribute unpack_sizes.



10
11
12
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 10

def unpack_sizes
  @unpack_sizes
end

Instance Method Details

#num_foldersInteger

Get total number of folders

Returns:

  • (Integer)

    Folder count



28
29
30
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 28

def num_folders
  @folders.size
end

#num_pack_streamsInteger

Get total number of pack streams

Returns:

  • (Integer)

    Pack stream count



35
36
37
# File 'lib/omnizip/formats/seven_zip/models/stream_info.rb', line 35

def num_pack_streams
  @pack_sizes.size
end