Skip to Content.
Sympa Menu

edugain-discuss - Re: [eduGAIN-discuss] Sizes of inline logos in eduGAIN metadata

edugain-discuss AT lists.geant.org

Subject: An open discussion list for topics related to the eduGAIN interfederation service.

List archive

Re: [eduGAIN-discuss] Sizes of inline logos in eduGAIN metadata


Chronological Thread 
  • From: Stefan Winter <stefan.winter AT restena.lu>
  • To: edugain-discuss AT lists.geant.org
  • Subject: Re: [eduGAIN-discuss] Sizes of inline logos in eduGAIN metadata
  • Date: Tue, 17 Mar 2020 09:48:57 +0100

Hi,


base64 expresses three binary bytes as four printable characters. There is thus an approximate relation that a base64 string is 4/3 (four thirds) of the binary source. The additional few bytes at the beginning of the URI become less and less significant the bigger the file is.


So you can easily say to customers "the file needs to be below 40 KB" and at the same time have code that checks for a base64 string size of say 60KCharacters (this is enough to include both 40 KB and 40 KiB and all the overheads of the URI, plus a few bytes of grace).


Greetings,


Stefan Winter


Am 17.03.20 um 07:46 schrieb Guy Halse:
Hi

On 2020/03/16 20:26, Ian Young wrote:
It's also slightly harder to say (and to code) "A data: URL that is more than X bytes when stripped of its prefix up to and including the 'base64,', then converted from Base64 to binary" than it is to say "Any URL that is more than X bytes." But it's obviously not very much harder (except for someone coding this up in XSLT, but I don't know how many people other than myself are that masochistic).

I can see why people would want to use the encoded form, because that's what is likely processed in aggregates and so as Ian rightly points out it's easier to just consider the whole data: url.

The reason we use the unencoded form is it is easier to explain to the technical staff at various providers. It refers to an actual file size they can see on disk, and is something they can readily ask their graphic designers to produce. "I need a logo that is x by y, but it must be smaller than 40KB."

IMHO keeping it simpler at that end is more important than the once-off cost of dealing with the code complexity :-)

- Guy
--
Guy Halse
Executive Officer: Trust & Identity Tertiary Education & Research Network of South Africa NPC Fault Reporting: +27(21)763-7147 or support AT tenet.ac.za
Office: +27(21)763-7102
http://www.tenet.ac.za/contact
https://orcid.org/0000-0002-9388-8592

PNG image

PNG image




Archive powered by MHonArc 2.6.19.

Top of Page