int unpack(Buffer opb) {
        int vendorlen = opb.read(32);
        if (vendorlen < 0) {
            clear();
            return (-1);
        }
        vendor = new byte[vendorlen + 1];
        opb.read(vendor, vendorlen);
        comments = opb.read(32);
        if (comments < 0) {
            clear();
            return (-1);
        }
        user_comments = new byte[comments + 1][];
        comment_lengths = new int[comments + 1];

        for (int i = 0; i < comments; i++) {
            int len = opb.read(32);
            if (len < 0) {
                clear();
                return (-1);
            }
            comment_lengths[i] = len;
            user_comments[i] = new byte[len + 1];
            opb.read(user_comments[i], len);
        }
        if (opb.read(1) != 1) {
            clear();
            return (-1);

        }
        return (0);
    }