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
63
use ;
/// A trait representing a chunk in a PNA archive.
///
/// A chunk is the basic unit of data storage in a PNA archive. Each chunk consists of:
/// - A length field (4 bytes)
/// - A chunk type (4 bytes)
/// - The chunk data (variable length)
/// - A CRC32 checksum (4 bytes)
///
/// This trait provides the basic interface for working with chunks in a PNA archive.
///
/// # Examples
/// ```no_run
/// use libpna::{Chunk, ChunkType, RawChunk};
///
/// fn process_chunk<C: Chunk>(chunk: &C) {
/// println!("Chunk type: {:?}", chunk.ty());
/// println!("Data length: {}", chunk.length());
/// println!("CRC32: {:08x}", chunk.crc());
/// }
/// ```