func readStr(r io.Reader) (string, error) {
    if l, err := readUint16(r); err != nil {
        return "", err
    } else {
        p := make([]byte, l)
        if _, err := io.ReadFull(r, p); err != nil {
            return "", err
        } else {
            return string(p), nil
        }
    }
}
// Read from io.Reader and decode as str

Read from io.Reader and decode as str
// Read from io . Reader and decode as str
func readStr(r io.Reader) (string, error) {
    if l, err := readUint16(r); err != nil {
        return "", err
    } else {
        p := make([]byte, l)
        if _, err := io.ReadFull(r, p); err != nil {
            return "", err
        } else {
            return string(p), nil
        }
    }
}
func readStr ( r io . Reader ) ( string , error ) { if l , err := readUint16 ( r ) ; err != nil { return " " , err } else { p := make ( [ ] byte , l ) if _ , err := io . ReadFull ( r , p ) ; err != nil { return " " , err } else { return string ( p ) , nil } } }
Read from io.Reader and decode as str
Read from io . Reader and decode as str