Skip to main content

tzap_core/
lib.rs

1//! Core implementation surface for the tzap v0.45 archive format.
2//!
3//! This crate owns wire-format parsing, validation, crypto, compression, FEC,
4//! and archive read/write primitives. The CLI stays intentionally thin.
5
6pub mod compression;
7pub mod crypto;
8pub mod entry_metadata;
9pub mod fec;
10pub mod format;
11pub mod metadata;
12pub mod non_seekable_reader;
13pub mod padding;
14pub mod reader;
15pub mod root_auth;
16pub mod tar_model;
17pub mod wire;
18pub mod writer;
19
20mod raw_stream_profile;
21mod streaming_writer;
22
23pub use crypto::{HmacDomain, KdfParams, MasterKey, Subkeys};
24pub use entry_metadata::{
25    canonical_base64_encode, decode_percent_name, encode_percent_name,
26    linux_posix_acl_xattr_to_schily, schily_posix_acl_to_linux_xattr, ArchiveTimestamp,
27    RestoreClass, RestorePolicy, SparseExtent,
28};
29pub use format::{
30    AeadAlgo, ArchiveWriteError, CompressionAlgo, ExtractError, FecAlgo, FormatError, KdfAlgo,
31    FORMAT_VERSION, VOLUME_FORMAT_REV,
32};
33pub use non_seekable_reader::{
34    extract_non_seekable_stream_to_dir, extract_non_seekable_stream_to_dir_with_bootstrap_sidecar,
35    extract_non_seekable_stream_to_dir_with_recipient_wrap_resolver,
36    extract_non_seekable_stream_to_dir_with_recipient_wrap_resolver_and_bootstrap_sidecar,
37    extract_unencrypted_non_seekable_stream_to_dir,
38    extract_unencrypted_non_seekable_stream_to_dir_with_bootstrap_sidecar,
39    list_non_seekable_stream, list_non_seekable_stream_with_bootstrap_sidecar,
40    list_non_seekable_stream_with_recipient_wrap_resolver,
41    list_non_seekable_stream_with_recipient_wrap_resolver_and_bootstrap_sidecar,
42    list_unencrypted_non_seekable_stream,
43    list_unencrypted_non_seekable_stream_with_bootstrap_sidecar, verify_non_seekable_stream,
44    verify_non_seekable_stream_with_bootstrap_sidecar, verify_non_seekable_stream_with_options,
45    verify_non_seekable_stream_with_recipient_wrap_resolver_and_bootstrap_sidecar,
46    verify_non_seekable_stream_with_recipient_wrap_resolver_options,
47    verify_unencrypted_non_seekable_stream_with_bootstrap_sidecar,
48    verify_unencrypted_non_seekable_stream_with_options, NonSeekableReaderOptions,
49    SequentialExtractReport, SequentialListReport, SequentialRootAuthStatus,
50    SequentialVerifyReport,
51};
52pub use reader::{
53    open_archive, open_archive_unencrypted, open_archive_volumes, open_archive_volumes_unencrypted,
54    open_archive_with_bootstrap_sidecar, open_archive_with_recipient_wrap_resolver,
55    open_non_seekable_archive, open_seekable_archive, open_seekable_archive_volumes,
56    open_seekable_archive_volumes_with_recipient_wrap_resolver_options,
57    open_seekable_archive_with_bootstrap_sidecar,
58    open_seekable_archive_with_bootstrap_sidecar_options,
59    open_seekable_archive_with_recipient_wrap_resolver_options, public_no_key_verify_archive_with,
60    public_no_key_verify_volumes_with, public_no_key_verify_volumes_with_options,
61    sequential_extract_tar_stream, ArchiveContentVerification, ArchiveEntry,
62    ArchiveExtractProgressSink, ArchiveIndexEntry, ArchiveReadAt, ArchiveRepairPatch,
63    OpenedArchive, PublicNoKeyDiagnostic, PublicNoKeyVerification, ReaderOptions,
64    RecipientWrapArchiveIdentity, RecipientWrapCandidateMasterKey, RecipientWrapRecordContext,
65    RootAuthDiagnostic, RootAuthVerification,
66};
67pub use streaming_writer::{
68    write_sized_raw_member_archive_to_sink_with_kdf_and_root_auth, write_tar_stream_archive,
69    write_tar_stream_archive_to_sink, write_tar_stream_archive_to_sink_with_kdf_and_root_auth,
70    StreamingRawWriterSummary, StreamingTarWriterSummary,
71};
72pub use tar_model::{
73    EntryMetadataVerification, MetadataDiagnostic, MetadataDiagnosticStatus, MetadataOperation,
74    MetadataVerificationReport, RestorePolicyCapability, SafeExtractionOptions, TarEntryKind,
75};
76pub use writer::{
77    encode_v45_sparse_map, write_archive, write_archive_sources_to_sink,
78    write_archive_sources_to_sink_ordered_parallel,
79    write_archive_sources_to_sink_ordered_parallel_with_progress,
80    write_archive_sources_to_sink_ordered_parallel_with_recipient_wrap_records,
81    write_archive_sources_to_sink_ordered_parallel_with_recipient_wrap_records_and_progress,
82    write_archive_sources_to_sink_single_pass,
83    write_archive_sources_to_sink_single_pass_with_progress,
84    write_archive_sources_to_sink_single_pass_with_recipient_wrap_records,
85    write_archive_sources_to_sink_with_progress, write_archive_unencrypted,
86    write_archive_with_dictionary, write_archive_with_dictionary_and_kdf,
87    write_archive_with_dictionary_and_root_auth, write_archive_with_dictionary_kdf_and_root_auth,
88    write_archive_with_kdf, write_archive_with_recipient_wrap_records,
89    write_archive_with_root_auth, write_archive_with_root_auth_and_kdf, write_empty_archive,
90    ArchiveWritePhase, ArchiveWriteProgressSink, ArchiveWriteSink, KeyWrapRecordSource,
91    MemoryArchiveSink, NativeAuxiliaryMetadata, NativeAuxiliaryNameEncoding, NativeFileMetadata,
92    PortableFileMetadata, PortableModeOrigin, PortablePosixOwner, RegularFile, RegularFileSource,
93    RootAuthSigningRequest, RootAuthWriterConfig, SourceEntryKind, WriterOptions, WriterTimings,
94    WrittenArchiveSummary,
95};