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

20 lines
406 B
Elixir
Raw Normal View History

2021-07-12 11:29:27 +00:00
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