Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ar archive format support #12

Open
M0Rf30 opened this issue Jan 7, 2025 · 2 comments
Open

ar archive format support #12

M0Rf30 opened this issue Jan 7, 2025 · 2 comments

Comments

@M0Rf30
Copy link
Contributor

M0Rf30 commented Jan 7, 2025

Introduce the format you are requesting.

from https://en.wikipedia.org/wiki/Ar_(Unix)

The ar format has never been standardized; modern archives are based on a common format with two main variants, BSD and System V (initially known as COFF, and used as well by GNU, ELF, and Windows.)

Historically there have been other variants[5] including V6, V7, AIX (small and big), and Coherent, which all vary significantly from the common format.[6]

Debian ".deb" archives use the common format.

An ar file begins with a global header, followed by a header and data section for each file stored within the ar file.

Each data section is 2 byte aligned. If it would end on an odd offset, a newline ('\n', 0x0A) is used as filler.

What do YOU use this format for?

ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose.

What is the format's conventional file extension(s)?

most common are:

  • .a
  • .deb

Please link to the format's formal or official specification(s).

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html->

Which Go libraries could be used to implement this format?

https://github.com/blakesmith/ar

@M0Rf30 M0Rf30 changed the title ar format support ar compression format support Jan 7, 2025
@M0Rf30 M0Rf30 changed the title ar compression format support ar archive format support Jan 7, 2025
@mholt
Copy link
Owner

mholt commented Jan 7, 2025

Can you edit your post to fill out the "New Format Request" template? And what do you use the ar format for?

@mholt
Copy link
Owner

mholt commented Jan 7, 2025

Thanks; I'm open to this, but the only Go implementations I can find (including the one you linked) haven't been touched in 6+ years. I would think that's fine if they worked pretty much perfectly, but there's open issues and PRs, casting doubt as to their reliability.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants