Skip to content

Commit cb43462

Browse files
committed
Fix typo in the "Decompression" guide
1 parent ad59077 commit cb43462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/Decompression.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ We need to attempt to decompress the data if the `content-encoding` header is pr
3030
# Returns a list of found compressions or [] if none found.
3131
defp get_content_encoding_header(headers) do
3232
headers
33-
|> Enum.flat_map([], fn {name, value} ->
33+
|> Enum.flat_map(fn {name, value} ->
3434
if String.downcase(name, :ascii) == "content-encoding" do
3535
value
3636
|> String.downcase()
@@ -44,7 +44,7 @@ defp get_content_encoding_header(headers) do
4444
end
4545
```
4646

47-
We use a combination of `Enum.flat_map/3` and `String.split/3` because the values can be comma-separated and spread over multiple headers. Now we should have a list like `["gzip"]`. We reversed the compression algorithms so that we decompress from the last one to the first one. Let's use this in another function that handles the decompression. Thankfully, Erlang ships with built-in support for gzip algorithm.
47+
We use a combination of `Enum.flat_map/2` and `String.split/3` because the values can be comma-separated and spread over multiple headers. Now we should have a list like `["gzip"]`. We reversed the compression algorithms so that we decompress from the last one to the first one. Let's use this in another function that handles the decompression. Thankfully, Erlang ships with built-in support for gzip algorithm.
4848

4949
```elixir
5050
defp decompress_data(data, algorithms) do

0 commit comments

Comments
 (0)