nvtiff-sys 0.1.3

Rust bindings to nvTIFF via bindgen
Documentation
# nvtiff-sys

[![crates.io](https://img.shields.io/crates/v/nvtiff-sys)](https://crates.io/crates/nvtiff-sys)
[![docs.rs](https://img.shields.io/docsrs/nvtiff-sys?label=docs.rs%20latest)](https://docs.rs/nvtiff-sys)

Rust bindings to [nvTIFF](https://developer.nvidia.com/nvtiff)
via [bindgen](https://rust-lang.github.io/rust-bindgen).

## Instructions

1. Download and install from .deb at
   <https://developer.nvidia.com/nvtiff-0-5-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=12&target_type=deb_network>
2. Patch nvtiff.h file, change
   - L539,L714,L821 `size_t memLimit=0);` -> ); `size_t memLimit);` no default argument
   - L912 `nvtiffTagDataType type,` -> `enum nvtiffTagDataType type,` enum type
   For example, run these sed commands (with sudo) to apply the patch.
   ```bash
   sed --in-place "s/memLimit=0/memLimit/g" /usr/include/nvtiff.h
   sed --in-place "s/stream=0/stream/g" /usr/include/nvtiff.h
   sed --in-place "s/nvtiffTagDataType type/enum nvtiffTagDataType type/g" /usr/include/nvtiff.h
   ```
3. Run `cargo build`
4. Bindings should be generated in `$CARGO_MANIFEST_DIR/src/nvtiff.rs` file.

### Testing

1. Download the following test files to the `images/` folder:
   - <https://github.com/NVIDIA/CUDALibrarySamples/blob/master/nvTIFF/nvTIFF-GeoTIFF-Decode/images/bali_notiles.tif>
   - <https://github.com/rasterio/rasterio/raw/refs/tags/1.4.3/tests/data/float32.tif>
2. Run `cargo test`.

## Contributing

We welcome third-party patches.
If you have any changes you'd like to make to nvtiff-sys, please send a patch to the
[nvtiff-sys-devel](https://lists.sr.ht/~weiji14/nvtiff-sys-devel) mailing list.