# Should the standard library be "batteries included"?

**URL:** <https://ziggit.dev/t/should-the-standard-library-be-batteries-included/3018>\
**Category:** Brainstorming\
**Tags:** standard-library\
**Created:** [January 26, 2024, 7:41pm UTC](https://ziggit.dev/t/should-the-standard-library-be-batteries-included/3018 "2024-01-26T19:41:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![squeek502](https://ziggit.dev/user_avatar/ziggit.dev/squeek502/32/409_2.png) [@squeek502](https://ziggit.dev/u/squeek502)\
**Post date:** [January 26, 2024, 9:03pm UTC](https://ziggit.dev/t/should-the-standard-library-be-batteries-included/3018/2 "2024-01-26T21:03:55Z")

</div>

> [@dee0xeed](#):
>
> Including any file format (tar, xz, jpeg whatever) features into Zig’s stdlib would create a mess

Note that Zig standard library already has support for `tar` extraction (and [planned support for `zip`](https://github.com/ziglang/zig/issues/17408)) as well as decompression support for DEFLATE, gzip, lzma, lzma2, xz, zlib, and zstandard. It also has compression support for DEFLATE and zlib.

For what gets included in the standard library, see:

> [@State of datetime handling in Zig?](https://ziggit.dev/t/state-of-datetime-handling-in-zig/2149/4):
>
> In general, the most relevant question for this is usually “is this / will this be a required component of some part of the compiler or standard library?”

> [@State of datetime handling in Zig?](https://ziggit.dev/t/state-of-datetime-handling-in-zig/2149/6):
>
> As an example, one feature of the compiler is the package manager, which means that the standard library needs to have:
> 
> - HTTP client
> - Decompression algorithms
> - TLS implementation
> - etc
> 
> If not for the package manager, this stuff may not be in the standard library at all, and instead left to 3rd party libraries.

Unsure if `tar` archiving will be needed internally or if a PR adding it would be merged, but it’s definitely not far fetched in terms of what’s in the standard library now.

---

_[View the full topic](https://ziggit.dev/t/should-the-standard-library-be-batteries-included/3018)._
