ex_data.gov.ua/lib/ex_data_gov_u_a/archivers/gz.ex

20 lines
406 B
Elixir

defmodule ExDataGovUA.Archivers.Gz do
@behaviour ExDataGovUA.Archivers.Base
@type input :: Stream.t()
@type output :: Stream.t()
@spec deflate(input) :: output
@doc """
Pack data to archive
"""
def deflate(stream), do: stream |> StreamGzip.gzip
@spec inflate(input) :: output
@doc """
Extract data from archive
"""
def inflate(stream), do: stream |> StreamGzip.gunzip
end