[][src]Function xdrfile::c_abi::xdrfile::xdrfile_decompress_coord_float

pub unsafe extern "C" fn xdrfile_decompress_coord_float(
    ptr: *mut c_float,
    ncoord: *mut c_int,
    precision: *mut c_float,
    xfp: *mut XDRFILE
) -> c_int

\brief Decompress coordiates from XDR file to array of floats

This routine will decompress three-dimensional coordinate data previously stored in an XDR file and store it in the specified array of floats.

The precision used during the earlier compression is read from the file and returned - you cannot adjust the accuracy at this stage.

\param ptr Pointer to coordinates to compress (length>= 3*ncoord) \param ncoord Max number of coordinate triplets to read on input, actual number of coordinate triplets read on return. If this is smaller than the number of coordinates in the frame an error will occur. \param precision The precision used in the previous compression will be written to this variable on return. \param xfp Handle to portably binary file

\return Number of coordinate triplets read. If this is negative, an error occured.

\warning Since we cannot count on being able to set/get the position of large files (>2Gb), it is not possible to recover from errors by re-reading the frame if the storage area you provided was too small. To avoid this from happening, we recommend that you store the number of coordinates triplet as an integer either in a header or just before the compressed coordinate data, so you can read it first and allocated enough memory.