# zlib: naming convention · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/67b3e07260ce5b41039968d35e957945e4661ffa)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 67b3e07260ce5b41039968d35e957945e4661ffa

Requested commit: 67b3e07260ce5b41039968d35e957945e4661ffa

Commit: 67b3e07260ce5b41039968d35e957945e4661ffa

Tree: fbbaadb4fe95b9f29b1939825fd190654e09ac0c

Author: Xavier Bouchoux

Committer: Andrew Kelley

## Message

```
zlib: naming convention

Adress review comments from https://github.com/ziglang/zig/pull/13977
by using the same naming convention as zstd.

And by using `finish()` instead of `close()` for the finalisation of the compressed stream.
rationale:
  - it is not the same as how close() is usually used, since it must be called to flush and write the final bytes. And as such it may fail.
  - it is not the same `flush` in the deflate code, which allows to keep writting more bytes later, and doesn't write the final checksum.
  - it is the same name as used in the original zlib library (Z_FINISH)

Also, use a packed struct for the header, which seems a better fit.

```

## Parents

- [8b923543969c8eceb90f493875b4bb8540f54a71](https://git.cafe/gitcafe/zig/commit/8b923543969c8eceb90f493875b4bb8540f54a71?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/67b3e07260ce5b41039968d35e957945e4661ffa?format=markdown)
