🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #62551

Re: [Xnews] Feature Request please :)

#62551
From: Ross Presser
Date: Mon, 19 Jun 2000 00:00
42 lines
2411 bytes
alt.distinguished.ric@aktive.getridofthis.co.uk
([RiC]).wrote.posted.offered: 

>The feature I would like to be added or to be told where it is (if
>already added) is how to find out the size of a message in kb rather
>than lines. 

This doesn't currently exist and doesn't seem very likely.  Xnews can 
guess using rules like you would (see below) but there's *no* way to be 
sure that an article really contains a binary file, let alone how big 
it will be.

>For the time being is there any way of finding out the size of a
>message or can some one tell me how many bytes one line is so I can
>do some sort of rudimentary math and work out the size.

There is *no* way to tell for sure, but one can make a good guess.

Firstly, there is no mandatory line length for either uuencode or 
base64 encoding.

Secondly, spammers often post attachments with large numbers of blank 
lines, or a lying "Lines:" header, just to get people to read their 
spam.

However, it is possible to guess and be right much of the time.  Almost 
all uuencoded files use a maximum line length of 81, including the "M" 
start.  There are 3 uuencode characters per 2 bytes.  Therefore, each 
line in a uuencoded file contains 80*0.67 = 53.333 bytes of the 
original file, or to put it another way, 19.2 uuencoded lines equal 
1024 bytes.  Divide the number of lines by 19.2 and you'll get an upper 
bound on the uuencoded file size in K (additional lines mean the result 
file will be slightly smaller).

Base64 should give a similar result, but I don't know the rules.
-- 
Ross Presser * ross_presser@imtek.com
'"Stuck" is not a state of being unable to solve a puzzle. "Stuck" is
a state of *believing* that you are unable to solve a puzzle.'
- Andrew "Zarf" Plotkin, waxing philosophical again

Technical Details
Message-ID: <8F5897A34pt101594@207.211.168.94>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <8F58BF5FAricaktivecouk@209.99.56.11>

Show Full Headers
Complete Article Headers
Message-ID: <8F5897A34pt101594@207.211.168.94>
Subject: Re: [Xnews] Feature Request please :)
Date: Mon, 19 Jun 2000 00:00:00 +0000
From: rpresser@NOSPAMimtek.com.invalid (Ross Presser)
References: <8F58BF5FAricaktivecouk@209.99.56.11>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 636490409
Organization: Imtek, Inc.
User-Agent: Xnews/03.04.11
Newsgroups: news.software.readers