     |> decompress()
   end
 
-  def compressable?(body), do: is_binary(body)
+  defp compressable?(body), do: is_binary(body)
 
+  @doc """
+  Compress request, used by `Tesla.Middleware.CompressRequest`
+  """
   def compress(env, opts) do
     if compressable?(env.body) do
       format = Keyword.get(opts || [], :format, "gzip")

defmodule Tesla.Middleware.Compression do
  def call(env, next, opts) do
    env
    |> compress(opts)

end

defmodule Tesla.Middleware.DecompressResponse do
  @behaviour Tesla.Middleware

  @moduledoc """
  Only decompress response.

  See `Tesla.Middleware.Compression` for options.
  """

  def call(env, next, _opts) do
    env
    |> Tesla.run(next)
