메소드 | 설명 | |
---|---|---|
Equivalent ( PngChunk c1, PngChunk c2 ) : bool |
Ad-hoc criteria for 'equivalent' chunks. Two chunks are equivalent if they have the same Id AND either: 1. they are Single 2. both are textual and have the same key 3. both are SPLT and have the same palette name Bear in mind that this is an ad-hoc, non-standard, nor required (nor wrong) criterion. Use it only if you find it useful. Notice that PNG allows to have repeated textual keys with same keys. |
|
FilterList ( List |
Filters a list of Chunks, keeping those which match the predicate The original list is not altered |
|
IsCritical ( String id ) : bool |
Critical chunks: first letter is uppercase
|
|
IsPublic ( String id ) : bool |
Public chunks: second letter is uppercase
|
|
IsSafeToCopy ( String id ) : bool |
Safe to copy chunk: fourth letter is lower case
|
|
IsText ( PngChunk c ) : bool | ||
IsUnknown ( PngChunk chunk ) : bool |
We consider a chunk as "unknown" if our chunk factory (even when it has been augmented by client code) doesn't recognize it
|
|
PosNullByte ( byte bytes ) : int |
Finds position of null byte in array
|
|
ShouldLoad ( String id, ChunkLoadBehaviour behav ) : bool |
Decides if a chunk should be loaded, according to a ChunkLoadBehaviour
|
|
ToBytes ( String x ) : byte[] |
Converts to bytes using Latin1 (ISO-8859-1)
|
|
ToBytesUTF8 ( String x ) : byte[] |
Converts to bytes using UTF-8
|
|
ToString ( byte x ) : String |
Converts to String using Latin1 (ISO-8859-1)
|
|
ToString ( byte x, int offset, int len ) : String |
Converts to String using Latin1 (ISO-8859-1)
|
|
ToStringUTF8 ( byte x ) : String |
Converts to string using UTF-8
|
|
ToStringUTF8 ( byte x, int offset, int len ) : String |
Converts to string using UTF-8
|
|
TrimList ( List |
Filters a list of Chunks, removing those which match the predicate The original list is not altered |
|
WriteBytesToStream ( Stream stream, byte bytes ) : void |
Writes full array of bytes to stream
|
메소드 | 설명 | |
---|---|---|
compressBytes ( byte ori, bool compress ) : byte[] | ||
compressBytes ( byte ori, int offset, int len, bool compress ) : byte[] | ||
maskMatch ( int v, int mask ) : bool | ||
shovelInToOut ( Stream inx, Stream outx ) : void |
public static Equivalent ( PngChunk c1, PngChunk c2 ) : bool | ||
c1 | PngChunk | Chunk1 |
c2 | PngChunk | Chunk1 |
리턴 | bool |
public static FilterList ( List |
||
list | List |
|
predicateKeep | ChunkPredicate | |
리턴 | List |
public static ShouldLoad ( String id, ChunkLoadBehaviour behav ) : bool | ||
id | String | |
behav | ChunkLoadBehaviour | |
리턴 | bool |
public static ToString ( byte x, int offset, int len ) : String | ||
x | byte | |
offset | int | |
len | int | |
리턴 | String |
public static ToStringUTF8 ( byte x, int offset, int len ) : String | ||
x | byte | |
offset | int | |
len | int | |
리턴 | String |
public static TrimList ( List |
||
list | List |
|
predicateRemove | ChunkPredicate | |
리턴 | int |
public static WriteBytesToStream ( Stream stream, byte bytes ) : void | ||
stream | Stream | |
bytes | byte | |
리턴 | void |