postgresql/src/common
Andrew Dunstan c8a350a439 Move tar detection and compression logic to common.
Consolidate tar archive identification and compression-type detection
logic into a shared location. Currently used by pg_basebackup and
pg_verifybackup, this functionality is also required for upcoming
pg_waldump enhancements.

This change promotes code reuse and simplifies maintenance across
frontend tools.

Author: Amul Sul <sulamul@gmail.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
discussion: https://postgr.es/m/CAAJ_b94bqdWN3h2J-PzzzQ2Npbwct5ZQHggn_QoYGhC2rn-=WQ@mail.gmail.com
2026-03-20 15:31:35 -04:00
..
unicode Update Unicode data to Unicode 17.0.0 2026-03-20 08:42:50 +01:00
.gitignore Replace the data structure used for keyword lookup. 2019-01-06 17:02:57 -05:00
archive.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
base64.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
binaryheap.c Remove #include <math.h> where not needed 2026-01-15 19:09:47 +01:00
blkreftable.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
checksum_helper.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
compression.c Move tar detection and compression logic to common. 2026-03-20 15:31:35 -04:00
config_info.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
controldata_utils.c Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
cryptohash.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
cryptohash_openssl.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
d2s.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
d2s_full_table.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
d2s_intrinsics.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
digit_table.h Change floating-point output format for improved performance. 2019-02-13 15:20:33 +00:00
encnames.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
exec.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
f2s.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
fe_memutils.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
file_perm.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
file_utils.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
hashfn.c Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
hmac.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
hmac_openssl.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
ip.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
jsonapi.c Fix some -Wcast-qual warnings 2026-02-27 21:57:33 +01:00
keywords.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
kwlookup.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
link-canary.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
logging.c Revert "Replace pg_restrict by standard restrict" 2026-01-14 15:12:25 +01:00
Makefile Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
md5.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
md5_common.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
md5_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
meson.build meson: allow disabling building/installation of static libraries. 2026-02-23 16:45:40 +01:00
parse_manifest.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
percentrepl.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_get_line.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_lzcompress.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_prng.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgfnames.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
psprintf.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
relpath.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
restricted_token.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
rmtree.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
ryu_common.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
saslprep.c Separate read and write pointers in pg_saslprep 2026-01-05 11:03:49 +01:00
scram-common.c Fix accidentally cast away qualifiers 2026-01-26 16:02:31 +01:00
sha1.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
sha1_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
sha2.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
sha2_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
sprompt.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
string.c Revert "Replace pg_restrict by standard restrict" 2026-01-14 15:12:25 +01:00
stringinfo.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
unicode_case.c Fix accidentally cast away qualifiers 2026-01-26 16:02:31 +01:00
unicode_category.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
unicode_norm.c Fix misc typos, mostly in comments 2026-01-08 18:10:08 +02:00
username.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
wait_error.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
wchar.c Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00