def readOctetStream(s, octetStream, minValue = 0):
    """
    @summary: read string as octet stream and compare with octetStream
    @param octetStream: compare stream
    @param s: Stream
    @param minValue: min value
    @return: if stream read from s is equal to octetStream
    """
    size = readLength(s) + minValue
    if size != len(octetStream):
        raise InvalidValue("incompatible size %d != %d"(len(octetStream), size))
    for i in range(0, size):
        c = UInt8()
        s.readType(c)
        if ord(octetStream[i]) != c.value:
            return False
        
    return True
def readOctetStream ( s , octetStream , minValue = 0 ) : size = readLength ( s ) + minValue if size != len ( octetStream ) : raise InvalidValue ( "incompatible size %d != %d" ( len ( octetStream ) , size ) ) for i in range ( 0 , size ) : c = UInt8 ( ) s . readType ( c ) if ord ( octetStream [ i ] ) != c . value : return False return True
@summary: read string as octet stream and compare with octetStream
    @param octetStream: compare stream
    @param s: Stream
    @param minValue: min value
    @return: if stream read from s is equal to octetStream