images encode

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

images encode

Post by ol4pr0 »

Hello ya all.

I live in a country where broadband cable is still a 6.3k down speed "GrR lol " so i wan wondering if it be smart to have all images encoded.

so instead of using <img src using base64_decode

Would that be way faster?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ol4pro wrote:Would that be way faster?
never.

base64 encoding converts 3 8-bit bytes into 4 6-bit bytes... it's strictly a transform, nothing more.
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

base64 doesn't compress.. in fact the size increases by about 1/3, besides what browser would know to decode it?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hedge wrote:what browser would know to decode it?
it'd have to be transmitted in the header's content-encoding.. you would need to determine if the browser supported the encoding in the first place however.. which is generally sent in to connection headers..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

thanks for clearning that up for me.
Post Reply