Module parse

Module parse 

Source
Expand description

Parse endpoints for IFC file processing.

Re-exportsΒ§

pub use fetch::check_cache;
pub use fetch::get_cached_geometry;
pub use fetch::get_data_model;
pub use fetch::get_symbolic;
pub use json::parse_full;
pub use json::parse_metadata;
pub use json::parse_stream;
pub use parquet::parse_parquet;
pub use parquet_optimized::parse_parquet_optimized;
pub use parquet_stream::parse_parquet_stream;

ModulesΒ§

cache_keys πŸ”’
Cache-key builders and symbolic-data cache helpers shared by the parse endpoints.
cached_replay πŸ”’
Cached-replay fast path for the SSE Parquet streaming endpoint: when a request’s geometry + metadata are already cached, replay them without re-parsing, in the same Start / (Batch + Progress)* / Complete shape a live parse streams (issue #3895). The geometry is split back into its original stream batches via parquet_replay_batches::split_into_batches (recovered from the cached blob’s Parquet row-group boundaries); a blob with no recoverable boundary falls back to one oversized batch, same as before.
fetch πŸ”’
GET cache fetch / check endpoints.
json πŸ”’
JSON / SSE-JSON parse endpoints.
parquet πŸ”’
Binary Parquet parse endpoints.
parquet_optimized πŸ”’
POST /api/v1/parse/parquet/optimized: the ara3d BOS-optimized Parquet parse endpoint, split out of parquet.rs when it gained a cache of its own (issue #3889) so neither module crosses the 400-line ratchet. The cache replay itself (metadata header, read-through-cache, response builder) now lives in parquet_optimized_replay.rs (issue #5128) for the same reason.
parquet_optimized_replay πŸ”’
Cache-replay plumbing for POST /api/v1/parse/parquet/optimized, split out of parquet_optimized.rs (issue #5128) so the route stays under the module-size ratchet once it gains a ?sha256= probe of its own β€” the same reason the flat route’s replay lives in cached_replay.rs rather than in parquet_stream.rs. replay_optimized_by_client_hash IS that probe.
parquet_stream πŸ”’
SSE Parquet-batch streaming parse endpoint.
replay_header πŸ”’
Marking a replayed X-IFC-Metadata header as served from cache (#5542).
stream_batch πŸ”’
One streamed batch’s CPU work on POST /api/v1/parse/parquet-stream: the cache-writer append and the client blob, in either stream mode.
stream_event πŸ”’
The SSE wire type of POST /api/v1/parse/parquet-stream.
stream_progress πŸ”’
The per-batch progress checkpoints a live parquet-stream parse reported, cached so a later cache hit can replay the SAME numbers.

StructsΒ§

ParseQuery
Query parameters shared by all parse endpoints.

FunctionsΒ§

cache_symbolic_data_off_runtime πŸ”’
Write the symbolic sidecar through cache_keys::cache_symbolic_data on the blocking pool (#4696).
extract_file πŸ”’
Extract file data from multipart request. Automatically decompresses gzip-compressed files, refusing inputs whose decompressed size would exceed max_file_size_mb.
is_apple_double πŸ”’
Unwrap a buildingSMART .ifcZIP container (issue #1494): a plain zip archive wrapping a single .ifc/.ifcxml model file (optionally alongside referenced resources like textures β€” those are ignored, not extracted). Returns the model entry’s bytes so the rest of the pipeline never has to know zip existed. Mirrors the TypeScript unwrapIfcZip semantics (packages/parser/src/ifczip.ts): rejects an archive with zero or more than one candidate rather than silently guessing which model to load, and bounds the decompressed size (zip-bomb guard) against the same max_bytes ceiling the raw/gzip paths use. Whether an archive entry is a macOS AppleDouble sidecar rather than content.
unwrap_ifczip πŸ”’