Class: Omnizip::Profile::FastProfile
- Inherits:
-
CompressionProfile
- Object
- CompressionProfile
- Omnizip::Profile::FastProfile
- Defined in:
- lib/omnizip/profile/fast_profile.rb
Overview
Fast compression profile
Optimizes for compression speed over compression ratio. Uses Deflate with level 1 for minimal CPU usage.
Instance Attribute Summary
Attributes inherited from CompressionProfile
#algorithm, #description, #filter, #level, #name, #solid
Instance Method Summary collapse
-
#initialize ⇒ FastProfile
constructor
Initialize fast profile.
-
#suitable_for?(_mime_type) ⇒ Boolean
Fast profile is suitable for all MIME types.
Methods inherited from CompressionProfile
#apply_to, #inspect, #to_h, #to_s
Constructor Details
#initialize ⇒ FastProfile
Initialize fast profile
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/omnizip/profile/fast_profile.rb', line 11 def initialize super( name: :fast, algorithm: :deflate, level: 1, filter: nil, solid: false, description: "Fast compression, lower ratio" ) end |
Instance Method Details
#suitable_for?(_mime_type) ⇒ Boolean
Fast profile is suitable for all MIME types
26 27 28 |
# File 'lib/omnizip/profile/fast_profile.rb', line 26 def suitable_for?(_mime_type) true end |