cloudini 0.3.1

The cloudini point cloud compression library for Rust.
Documentation
//! Raw FFI declarations for the cloudini C++ library (feature `use_cpp`).
//!
//! These map 1-to-1 to the functions in `cloudini_lib/src/cloudini_c.cpp`.
//! Do not call these directly — use [`crate::CppPointcloudEncoder`] and
//! [`crate::CppPointcloudDecoder`] instead.

use std::ffi::c_char;

unsafe extern "C" {
    /// Encode raw point data into a Cloudini buffer.
    /// Returns compressed byte count written to `output`, or 0 on error.
    pub fn cloudini_c_encode(
        header_yaml: *const c_char,
        pc_data: *const u8,
        pc_data_size: u32,
        output: *mut u8,
        max_output_size: u32,
        use_threads: i32,
    ) -> u32;

    /// Decode a complete Cloudini buffer into raw point data.
    /// Returns decompressed byte count written to `output`, or 0 on error.
    pub fn cloudini_c_decode(
        encoded: *const u8,
        encoded_size: u32,
        output: *mut u8,
        max_output_size: u32,
    ) -> u32;

    /// Return `width * height * point_step` from the embedded header.
    /// Returns 0 on error. No decompression is performed.
    pub fn cloudini_c_decompressed_size(encoded: *const u8, encoded_size: u32) -> u32;
}