Required Instance Methodswift-png 4.4.5PNG

    read(count:)

    Attempts to read and return the given number of bytes from this stream.

    PNG.BytestreamSource.swift:30
    mutating func read(count: Int) -> [UInt8]?

    Parameters

    count

    The number of bytes to read.

    Returns

    The count bytes read, or nil if the read attempt failed. This method should return nil even if any number of bytes less than count were successfully read.

    A successful call to this function should affect the bytestream state such that subsequent calls should pick up where the last call left off.

    The rest of the library interprets a nil return value from this function as indicating end-of-stream.