From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Question: estimating size of a buffer when written to file? Date: Wed, 08 Dec 2021 16:52:47 +0100 Message-ID: <87a6hbw0ts.fsf@gmx.net> References: <3703D806-12C4-4EE6-ADB8-8A006D7AFC35@mit.edu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25113"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 16:54:57 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muzHU-0006L5-FA for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 16:54:56 +0100 Original-Received: from localhost ([::1]:41256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muzHS-00010U-HK for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 10:54:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muzFe-0007z2-No for emacs-devel@gnu.org; Wed, 08 Dec 2021 10:53:02 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:56007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muzFW-0004im-L9 for emacs-devel@gnu.org; Wed, 08 Dec 2021 10:52:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638978768; bh=p1+NOVMFLVJhXtYtMMIekTTmbNEropeg0WuirCXHnkI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ah5TmARey2KGrJ9WFL6dgLxROyDAjZuDjXVzeM9VdDtcKgAy3/M6w2+WlNUeRanmX Y7uZ88VftCiQtk8D+5GRuGOV/Ibypk59ZGDj5cQ8S7x2zB1d6Vm70e6Dy0zWyrCm90 7TUtPY9sgFewxZa1m7GmdIbGniMBAyWIzrBp4vQk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([87.122.222.228]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9dsV-1mRN371ww9-015bJe; Wed, 08 Dec 2021 16:52:48 +0100 In-Reply-To: <3703D806-12C4-4EE6-ADB8-8A006D7AFC35@mit.edu> (Qiantan Hong's message of "Wed, 8 Dec 2021 15:33:06 +0000") X-Provags-ID: V03:K1:9nIGbK/D8onJCkvORi5sxUU438iIN49IleRmnJyncl3vi4XJTfE M3Gc1jl07sqDH4NvLI6t/7QGTRmTkdBSSadtBvDPDjSz2wH/MhQuvSvl6PwUiULZl177/1J WxikiqcH/0tPIV+Gg3ByPhnnYTg1hM3rXQaE7ab3wsk5GDSGYFfXgbYpn7o1BkHouns6Hp6 ab8owpx621ZG3k/9l4aOg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ut0WNIXdad0=:Qd4rWhVkyHYCebL9sDcNo8 AV7+rGgirmWEuz8rugGvTBrad3hg8N2zE/BftOyRIbXjQY8KiXM2kTjw1wQ35C4RbUuq8GkuI buaICJsO5eG8QkXbP+VugOEemSpqIilYXO0u9RapSnidwgqw+avvZxc3ONJyfRa43mSLcXsm5 k56IynqRQPX9wFm74L0/W9Y3vd+JW2xlkoCVo56yugNYyNbWB3Q64maQylH38D5JJ07ho4/od uEhTUOgVHfXw/BQNbMHspGirMbeyGeICxxkB9NBTqw5FEbCPQK2uMQytWjUZrtaJKgr9cK3b2 rWPc/Z11j3V+N+u67GEGu0tX46Qb/zCnyBJLEtHq9llyMZcZu9+tUkGPXNX3hpgPJNMgKtUSn xX7LLsygokJwMoQW/K7GOQQOuBdUIAb1ULA/0idv1JyUDyQkjaZ9k4C9eCgPIEuTCxSPrV+je gJ+/6Q+hRllJL2g9rm8vZpK7rAuYXdWEFo/PZUBWqlVv3I8ro1L/PXGdEqIlfmGTI6x9mou6Z 2ZqOTU6dvO5PB7NWbIloylH/BOZzwj+fM0V62k8OJtaiU2Otz4GCVK/Nh+kANW8pd5v3Or+o+ xLE31LxMskWvnrNjlb9xxLMJmY59u+mKjXyUQ4kPEISZFqqvnXZEF0w8V1CJQ5YQO3d0aUvbX NdR+bWr1lkXGKY9j+H6BIrbhj5qmbaEzFicq3rzQfIO7JMxWUAk74iqVQdSExA1R57AxDUHrw nhAK5o10ec+EH9R/GrsJ8g51vByb8oCSasnZYoTU14A5siNJrOWqHE+tiKyoNQIW+wb25drZ Received-SPF: pass client-ip=212.227.15.19; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281361 Archived-At: On Wed, 8 Dec 2021 15:33:06 +0000 Qiantan Hong wrote: > Is there any reliable way to get (or conservatively estimate) > the size of a buffer when written to file? Is (string-bytes (buffer-string)) not reliable? Steve Berman