Structureswift-png 4.4.5PNG
Source
A type for reading data from files on disk.
System.swift:33struct Source
See also
enum File
A namespace for file IO functionality.
struct Destination
A type for writing data to files on disk.
Citizens in PNG
Conformances
protocol BytestreamSource
A source bytestream.
Type members
static func open<R>(path: String, (inout `Self`) throws -> R
) rethrows -> R? Calls a closure with an interface for reading from the specified file.
Instance members
var count: Int?
The size of the file, in bytes, or
nil
if the file is not a regular file or a link to a file.func read(count: Int
) -> [UInt8]? Reads the specified number of bytes from this file interface.
Instance features
func chunk(
) throws -> (type: PNG.Chunk, data: [UInt8]) Lexes a chunk from this bytestream.
func signature(
) throws Lexes the eight PNG signature bytes from this bytestream.