1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Compression codecs and artifact packing helpers for ephemeris data.
//!
//! The current implementation defines a small, deterministic artifact format
//! with explicit versioning, checksums, artifact capability profiles, and
//! quantized polynomial segments. Optional residual-correction channels are
//! also supported so denser artifacts can keep a compact base fit while
//! layering deterministic corrections on top. The format is intentionally
//! simple enough to audit while still exercising the same segmented lookup flow
//! and random-access body/segment helpers that later, denser artifacts will use.
//! See `spec/data-compression.md` for the stored-vs-derived output contract and
//! `docs/time-observer-policy.md` for the explicit packaged lookup policy that
//! keeps derived coordinates separate from observer-driven body-position modes.
//!
//! Enable the optional `serde` feature to serialize compressed artifacts for
//! inspection or interchange workflows.
//!
//! # Examples
//!
//! ```
//! use pleiades_compression::{ArtifactHeader, BodyArtifact, ChannelKind, CompressedArtifact,
//! PolynomialChannel, Segment, ARTIFACT_VERSION};
//! use pleiades_types::{CelestialBody, Instant, JulianDay, TimeScale};
//!
//! let artifact = CompressedArtifact::new(
//! ArtifactHeader::new("demo", "synthetic example data"),
//! vec![BodyArtifact::new(
//! CelestialBody::Sun,
//! vec![Segment::new(
//! Instant::new(JulianDay::from_days(0.0), TimeScale::Tt),
//! Instant::new(JulianDay::from_days(1.0), TimeScale::Tt),
//! vec![PolynomialChannel::linear(ChannelKind::Longitude, 9, 10.0, 11.0)],
//! )],
//! )],
//! );
//! assert_eq!(artifact.header.version, ARTIFACT_VERSION);
//! ```
use fmt;
pub
pub
pub
pub
pub
// ── Public re-exports (preserve exact prior public surface) ───────────────────
pub use CompressedArtifact;
pub use ;
pub use ;
pub use ;
pub use ;
// ── Crate-level constants ─────────────────────────────────────────────────────
/// Current artifact format version.
pub const ARTIFACT_VERSION: u16 = 7;
pub const ARTIFACT_MAGIC: = *b"PLDEPHEM";
// ── Public formatting helper ──────────────────────────────────────────────────
/// Joins displayable values into a compact comma-separated list.
///
/// This helper is used by release-facing summaries that need a stable,
/// human-readable body or capability listing without introducing an extra
/// formatting dependency in downstream crates.