Sha256: fd60475354ef5a945e2ba28d6ae66f2aa2a33b82bed2f264a24b412c9a34ca6e

Contents?: true

Size: 435 Bytes

Versions: 14

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

require "zlib"
require "stringio"

module Datadog
  module CI
    module Transport
      module Gzip
        module_function

        def compress(input)
          sio = StringIO.new
          gzip_writer = Zlib::GzipWriter.new(sio, Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY)
          gzip_writer << input
          gzip_writer.close
          sio.string
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
datadog-ci-1.0.0.beta3 lib/datadog/ci/transport/gzip.rb
datadog-ci-1.0.0.beta2 lib/datadog/ci/transport/gzip.rb
datadog-ci-1.0.0.beta1 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.8.3 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.8.2 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.8.1 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.8.0 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.7.0 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.6.0 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.5.1 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.5.0 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.4.1 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.4.0 lib/datadog/ci/transport/gzip.rb
datadog-ci-0.3.0 lib/datadog/ci/transport/gzip.rb