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
/*
* Copyright (c) 2023.
*
* This software is free software; You can redistribute it or modify it under terms of the MIT, Apache License or Zlib license
*/
//! Core routines shared by all libraries
//!
//! This crate provides a set of core routines shared
//! by the decoders and encoders under `zune` umbrella
//!
//! It currently contains
//!
//! - A bytestream reader and writer with endian aware reads and writes
//! - Colorspace and bit depth information shared by images
//! - Image decoder and encoder options
//! - A simple enum type to hold image decoding results.
//!
//! This library is `#[no_std]` with `alloc` feature needed for defining `Vec`
//! which we need for storing decoded bytes.
//!
//!
//! # Features
//! - `no_std`: Enables `#[no_std]` compilation support.
//!
//! - `serde`: Enables serializing of some of the data structures
//! present in the crate
//!
//!
//! # Input/Output
//!
//! zune-image supports many different input and output devices. For input readers
//! we can read anything that implements `BufRead` + `Seek` and provide an optimized routine for
//! handling in memory buffers by using [`ZCursor`](crate::bytestream::ZCursor).
//!
//! For output, we support anything that implements `Write` trait, this includes files, standard io streams
//! network sockets, etc
//!
//! In a `no_std` environment. We can write to in memory buffers `&mut [u8]` and `&mut Vec<u8>`
//!
//! If you have an in memory buffer, use [`ZCursor`](crate::bytestream::ZCursor),
//! it's optimized for in memory buffers.
//!
//!
//!
extern crate alloc;
extern crate core;
pub use log;