Sha256: 4d865ce1e7b043fba67513399cabf2109c42ca8f6c9237c11a04e7e545d2d348
Contents?: true
Size: 1022 Bytes
Versions: 12
Compression:
Stored size: 1022 Bytes
Contents
# frozen_string_literal: true module Uricp::Strategy class PipedLocalDecompress include Uricp::Strategy::Common def appropriate? case from.scheme when 'pipe' if raw_target? && lz4_source? && to.scheme == 'file' return proposal if always_write_sparse? debug "#{self.class.name}: using safe sparse expansion via stream" end end debug "#{self.class.name}: not appropriate" false end def command "lz4 -qdf - #{to.path};" end def proposal @proposed_options = options.dup @proposed_options.delete('source-format') if @proposed_options['target-format'] @proposed_options['source-format'] = :raw if @proposed_options['source-format'] == @proposed_options['target-format'] @proposed_options.delete('source-format') @proposed_options.delete('target-format') end end @proposed_options['from_uri'] = @proposed_options['to_uri'] self end end end
Version data entries
12 entries across 12 versions & 1 rubygems