Class: Omnizip::Profile::BalancedProfile
- Inherits:
-
CompressionProfile
- Object
- CompressionProfile
- Omnizip::Profile::BalancedProfile
- Defined in:
- lib/omnizip/profile/balanced_profile.rb
Overview
Balanced compression profile
Provides a good balance between compression speed and ratio. Uses Deflate with level 6 (the default for most use cases).
Instance Attribute Summary
Attributes inherited from CompressionProfile
#algorithm, #description, #filter, #level, #name, #solid
Instance Method Summary collapse
-
#initialize ⇒ BalancedProfile
constructor
Initialize balanced profile.
-
#suitable_for?(_mime_type) ⇒ Boolean
Balanced profile is suitable for all MIME types.
Methods inherited from CompressionProfile
#apply_to, #inspect, #to_h, #to_s
Constructor Details
#initialize ⇒ BalancedProfile
Initialize balanced profile
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/omnizip/profile/balanced_profile.rb', line 11 def initialize super( name: :balanced, algorithm: :deflate, level: 6, filter: nil, solid: false, description: "Balanced speed/compression (default)" ) end |
Instance Method Details
#suitable_for?(_mime_type) ⇒ Boolean
Balanced profile is suitable for all MIME types
26 27 28 |
# File 'lib/omnizip/profile/balanced_profile.rb', line 26 def suitable_for?(_mime_type) true end |