Sha256: e0905fbc22508e0b829e7ad8b3bc4d92a5b020fee3cfe467e20d296d56f03fc7

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

module Uricp::Strategy
  class PipedCompress
    include Uricp::Strategy::Common

    def appropriate?
      case from.scheme
      when 'pipe'
        return proposal if compression_required?
      end
      debug "#{self.class.name}: not appropriate"
      false
    end

    def command
      'lz4 |'
    end

    def proposal
      @proposed_options = options.dup
      @proposed_options.delete('compress')
      @proposed_options['encoding'] = 'lz4'
      self
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uricp-0.0.24 lib/uricp/strategy/piped_compress.rb
uricp-0.0.23 lib/uricp/strategy/piped_compress.rb
uricp-0.0.22 lib/uricp/strategy/piped_compress.rb
uricp-0.0.21 lib/uricp/strategy/piped_compress.rb
uricp-0.0.20 lib/uricp/strategy/piped_compress.rb
uricp-0.0.18 lib/uricp/strategy/piped_compress.rb
uricp-0.0.17 lib/uricp/strategy/piped_compress.rb
uricp-0.0.16 lib/uricp/strategy/piped_compress.rb