diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-06-21 21:05:52 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-06-21 21:05:52 +0200 |
| commit | 352494cbb4ad2ddb650b59ce8102da3ea0942e79 (patch) | |
| tree | 26e0d545c17b6bc64a40550e493a2ba1da648070 /core/compress/gzip | |
| parent | 797c41950a90f75a279a48195baf733903e23ca3 (diff) | |
ZLIB: Start optimization.
Diffstat (limited to 'core/compress/gzip')
| -rw-r--r-- | core/compress/gzip/example.odin | 11 | ||||
| -rw-r--r-- | core/compress/gzip/gzip.odin | 21 |
2 files changed, 26 insertions, 6 deletions
diff --git a/core/compress/gzip/example.odin b/core/compress/gzip/example.odin index 1ab899e00..81935a43a 100644 --- a/core/compress/gzip/example.odin +++ b/core/compress/gzip/example.odin @@ -1,6 +1,17 @@ //+ignore package gzip +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation. + Ginger Bill: Cosmetic changes. + + A small GZIP implementation as an example. +*/ + import "core:compress/gzip" import "core:bytes" import "core:os" diff --git a/core/compress/gzip/gzip.odin b/core/compress/gzip/gzip.odin index 82488a5a8..55e00198a 100644 --- a/core/compress/gzip/gzip.odin +++ b/core/compress/gzip/gzip.odin @@ -1,5 +1,19 @@ package gzip +/* + Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. + Made available under Odin's BSD-2 license. + + List of contributors: + Jeroen van Rijn: Initial implementation. + + This package implements support for the GZIP file format v4.3, + as specified in RFC 1952. + + It is implemented in such a way that it lends itself naturally + to be the input to a complementary TAR implementation. +*/ + import "core:compress/zlib" import "core:compress" import "core:os" @@ -9,11 +23,6 @@ import "core:hash" /* - This package implements support for the GZIP file format v4.3, - as specified in RFC 1952. - - It is implemented in such a way that it lends itself naturally - to be the input to a complementary TAR implementation. */ @@ -200,7 +209,7 @@ load_from_stream :: proc(stream: io.Stream, buf: ^bytes.Buffer, allocator := con xlen -= field_length; // printf("%v\n", string(field_data)); - } + } if xlen != 0 { return E_GZIP.Invalid_Extra_Data; |