Class: Ronin::Support::Archive::Zip::Reader::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/ronin/support/archive/zip/reader/statistics.rb

Overview

Represents the overall statistics for the zip archive.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length:, size:, compression:, files:) ⇒ Statistics

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initializes the statistics object.

Parameters:

Since:

  • 1.0.0



64
65
66
67
68
69
# File 'lib/ronin/support/archive/zip/reader/statistics.rb', line 64

def initialize(length: , size: , compression: , files: )
  @length      = length
  @size        = size
  @compression = compression
  @files       = files
end

Instance Attribute Details

#compressionInteger (readonly)

The total compression ratio of the zip archive.

Returns:

Since:

  • 1.0.0



44
45
46
# File 'lib/ronin/support/archive/zip/reader/statistics.rb', line 44

def compression
  @compression
end

#filesInteger (readonly)

The total number of files in the zip archive.

Returns:

Since:

  • 1.0.0



49
50
51
# File 'lib/ronin/support/archive/zip/reader/statistics.rb', line 49

def files
  @files
end

#lengthInteger (readonly)

The total zip archive length.

Returns:

Since:

  • 1.0.0



34
35
36
# File 'lib/ronin/support/archive/zip/reader/statistics.rb', line 34

def length
  @length
end

#sizeInteger (readonly)

The total zip archive size.

Returns:

Since:

  • 1.0.0



39
40
41
# File 'lib/ronin/support/archive/zip/reader/statistics.rb', line 39

def size
  @size
end