Re: [Cellar] Benjamin Kaduk's Discuss on draft-ietf-cellar-ebml-15: (with DISCUSS and COMMENT)

Steve Lhomme <slhomme@matroska.org> Fri, 27 December 2019 09:18 UTC

Return-Path: <slhomme@matroska.org>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DD09E120105 for <cellar@ietfa.amsl.com>; Fri, 27 Dec 2019 01:18:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=matroska-org.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d39o2YeKi-qn for <cellar@ietfa.amsl.com>; Fri, 27 Dec 2019 01:18:10 -0800 (PST)
Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6F9471200FE for <cellar@ietf.org>; Fri, 27 Dec 2019 01:18:10 -0800 (PST)
Received: by mail-wr1-x42c.google.com with SMTP id q6so25507792wro.9 for <cellar@ietf.org>; Fri, 27 Dec 2019 01:18:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=matroska-org.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Yjk3ehK4rOX0gH96S7TirfIRfX/+wCHrdtURK0eXFm4=; b=zvN8kgoHNw46Oq/9TZzwDf12WN0tTM6HBp7BRIzO0eoOWXORmTzBbVu4rG18Lz2nKJ qXEooZjRG1BEPmBKg3Ar6urbktOA9p7fX8jyuxN9diplms0YLXaUgzqcvI5ouzkM4B2t mdI6Iu3euLu3pJRpEn/vt+0OkVvnpMhG99WOKc3jQEM0Hv+CT4rGrL2iTLnxRTuWPbz6 HT25Q0Re2qrCjPeOup9Tt38Et/179weG/EbZC5XYf4Ns6nS9UKwuoOgTlK2u5cMdeN22 xgqGQ28imuABY4EE0HcF1Ft5Flsyt/QWGiu5hDjaWRtoIAQiF4uQCwoMJExqcvLFESLe 3MCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Yjk3ehK4rOX0gH96S7TirfIRfX/+wCHrdtURK0eXFm4=; b=q+0nnUMqlbrXIe8ok/Nih4cTxVHezMPWUt4VNfI7lO5mZpOj/Y5Ylji9RmdlXGnT+g HVE6dLOvd32N2ZAbls4Ajte13NBlSb3Cd0b1A9yIv88aDsj9DhVcn/K+2r7qFvp3jLmQ RMTqUHsfgBYlZv4rlz/m0v02+Z2qOFZxkVOa5aTng+2h7UfkJcilq1jsDt5LLw4MBThK 3RzZQtxns/ZXiTOM+O1HE9tB2RNtku+pjht0ipFfOZkmqhqAqkMfT9TlC1abW5cvJrC4 WY0/EZYLMlbf3eclqzVqaJHuiLGQz92dCc7UEoVZaoIqEJD2FantCZoaP4cg4t7BQVp8 VwUQ==
X-Gm-Message-State: APjAAAXJGDK/PxbYK0gSoIy3Jb6tuGsVNwntA84X5BuFVV3MC0cymIuM xKkCsyzlrl9l99xFnrFNGNpL1eegLaM=
X-Google-Smtp-Source: APXvYqxKYZ8fUfFw1b+Z38mkpFwrItw/Re7yjYbpjB2L/0ejbLtZkvF1+NyhFwFTi3FNDlcCAxIZJQ==
X-Received: by 2002:adf:fe0e:: with SMTP id n14mr49214960wrr.116.1577438288612; Fri, 27 Dec 2019 01:18:08 -0800 (PST)
Received: from [192.168.3.26] (229.74.9.109.rev.sfr.net. [109.9.74.229]) by smtp.gmail.com with ESMTPSA id f1sm34631623wrp.93.2019.12.27.01.18.06 for <cellar@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Dec 2019 01:18:08 -0800 (PST)
To: cellar@ietf.org
References: <157676970970.27491.11040479061607849531.idtracker@ietfa.amsl.com> <CAOXsMFJKk3HTEjoAJ9URhGt97SA++kNDp3HCVMscj+qED5+VgA@mail.gmail.com> <20191224184147.GP35479@kduck.mit.edu> <88ed13cf-c9d6-5f60-f4bf-23eeb6163e4a@gmx.ch>
From: Steve Lhomme <slhomme@matroska.org>
Message-ID: <d3b0e9b1-5a2c-42a5-3600-305c759e6517@matroska.org>
Date: Fri, 27 Dec 2019 10:18:07 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <88ed13cf-c9d6-5f60-f4bf-23eeb6163e4a@gmx.ch>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/JGtsoRyJi6F6qGrSREzmWm14dEo>
Subject: Re: [Cellar] Benjamin Kaduk's Discuss on draft-ietf-cellar-ebml-15: (with DISCUSS and COMMENT)
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Codec Encoding for LossLess Archiving and Realtime transmission <cellar.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cellar>, <mailto:cellar-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cellar/>
List-Post: <mailto:cellar@ietf.org>
List-Help: <mailto:cellar-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cellar>, <mailto:cellar-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Dec 2019 09:18:12 -0000

On 2019-12-25 14:13, hubblec4 wrote:
> Hello
> 
> Am 24.12.2019 um 19:41 schrieb Benjamin Kaduk:
>> On Tue, Dec 24, 2019 at 04:20:25PM +0100, Steve Lhomme wrote:
>>>> Section 4.1
>>>>
>>>>     Each Variable Size Integer begins with a VINT_WIDTH which 
>>>> consists of
>>>>     zero or many zero-value bits.  The count of consecutive zero-values
>>>>     of the VINT_WIDTH plus one equals the length in octets of the
>>>>     Variable Size Integer.  [...]
>>>>
>>>> Does the following attempted rewording change the meaning?
>>> Nope, maybe the meaning wasn't clear before. Hopefully it's better now.
>> I think Barry had some good suggestions here as well, so I think it's
>> better, yes.
> 
> Some ideas from me:
> 
> As I started to write my own Matroska parser it was not easy to
> understand what is mean with all this and how I have to do.
> After many reading and try, I understood it. For me is the VINT_MARKER
> the key.
> 
> The position of the VINT_MARKER is the VINT_WIDTH.
> 
> Lazarus(my programming language) use a function "pos()", it gives me the
> position of the first occurence of what I want.
> In our case the VINT_MARKER is a "1".
> 
> VINT_WIDTH = pos(FIRST-BYTE-OF-VINT , VINT_MARKER);
> Thats all what I have to code. No counting zero values, no adding one to
> counted zero values.

For the record many processors have an instruction to find this value 
easily:
https://en.wikipedia.org/wiki/Find_first_set