UNSW Engineering
CSE
CSE Forums
Working together at CSE
 
 Watched TopicsWatched Topics   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  DigestsDigests   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LZ77 on Javascript to compress html.
Post new topic   Reply to topic    CSE Forums Forum Index -> CSE-Soc
View previous topic :: View next topic  
Author Message
Noj
Anonymous
Guest




PostPosted: Thu Apr 03, 2008 11:34 pm    Post subject: LZ77 on Javascript to compress html. Reply with quote

I found some way to compress javascript by dean edwards. really nice code. Used it with SPRY framework , and it compresses the framework by 70%.

http://javascriptcompressor.com/

I was trying to google, if there was any html compression on client side. the best i found, that if apache2 enables the mod_gzip and mod_deflate, then the users have a good experience, at server cost!!!

that's the best i got. may be i didn't google enough.

Was just wondering if it was possible to use the body.innerHTML property to dynamical generate a html file, which is compressed using an lz77 algorithm,and sent with the javascript as a compressed string. using a javascript framework, i could regenarate the original html, lossless.

i just need help on how to implement this. anyone having an idea, please help me out.
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Mon Apr 07, 2008 9:46 pm    Post subject: Reply with quote

to quote myself
http://cgi.cse.unsw.edu.au/~mjc/blog/index.php?entry=entry080205-211336

ie, you can literally call the command gzip
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Noj
Anonymous
Guest




PostPosted: Wed Apr 09, 2008 6:50 pm    Post subject: Reply with quote

that's awesome, I never thought this could be done through headers.

btw what blog software are you using.
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Thu Apr 10, 2008 8:44 am    Post subject: Reply with quote

http://www.simplephpblog.com/
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Noj
Anonymous
Guest




PostPosted: Fri Apr 11, 2008 4:58 pm    Post subject: Reply with quote

thanks, I've been waiting to find a tool to run databases without actually running databases.

www.cse.unsw.edu.au/~noj/blog

I should say, its a really simple blog.

he uses text files to store the blogs. Searching operations would be really intensive, the way he does it.

a better method would be to use serialize functions in php. He wouldn't have to parse all the txt files, into arrays.
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Fri Apr 11, 2008 5:25 pm    Post subject: Reply with quote

use of text files in an intentional design feature for this blog,
as if its the kind of blog that your happy running on simplephpblog,
then there arent going to be that many people doing search operations on it

its not ment to be a super duper thing
its intention is to be simple
simple can mean inefficient on occasion

im sure he would be quite happy to accept patches to various things if you have particular issues with it, it is open source.
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Noj
Anonymous
Guest




PostPosted: Fri Apr 11, 2008 6:55 pm    Post subject: Reply with quote

but its quite a massive project though with 24,081 lines and 102,775 words. i haven't counted free space lines, or lines in CSS.

wonder why guys in our uni don' t think of such interesting ideas and put it on sourceforge.
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Fri Apr 11, 2008 10:12 pm    Post subject: Reply with quote

they do

you just havent looked for them
i dont know about current students
but one very notable case is that e16 and 17 window managers are written by an ex-cse guy
(e16 is currently installed on the lab machines, but e17 is heaps better)
http://www.enlightenment.org/

and the nfs maintainer for linux, i think is employed here

im sure there are a heap of examples
i'd be nice if someone did a survey so we could get an idea who contributes to what



you also need to realise that 20000 lines is small
your just seem to be used to very very tiny codebases from subject assignments that are supposed to be finished within a few days.
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Noj
Anonymous
Guest




PostPosted: Fri Apr 11, 2008 11:44 pm    Post subject: Reply with quote

Quote:
im sure there are a heap of examples
i'd be nice if someone did a survey so we could get an idea who contributes to what

you also need to realise that 20000 lines is small
your just seem to be used to very very tiny codebases from subject assignments that are supposed to be finished within a few days.


i've only started coding for the last two years, before i lived in the world of flinstones. he started the project in 2004 though.

most of these big projects have more than one brains behind them. We should have something like 20% thing in CSE.
Back to top
chucknthem
Jia Ma



Joined: 07 Mar 2007

PostPosted: Sat Apr 12, 2008 2:42 am    Post subject: Reply with quote

You can have the 20% thing...assuming you finish your work before you start on your 20% just like how it's done at google :p

although it might be nice to get course credit for them...and not have to pay tuition for it. Prashantv is doing a research project worth 12UOC, I wonder if he has to pay tuition on that...
_________________
--
cs2041
Back to top
View user's profile Send private message
Noj
Anonymous
Guest




PostPosted: Sat Apr 12, 2008 2:18 pm    Post subject: Reply with quote

yeah that would be great. !!

bt most googlasters work in team, to create huge stuff. it would be great if CSE had some 20% kinda thing, which we got credits, and could work as a group too.

it should be something like , you have to host your project in sourceforge, and to if you get more than 10,000 downloads you get HD. something like, if the whole project is dumb, you don't get marks, coz you haven't created something creative.
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Sat Apr 12, 2008 2:39 pm    Post subject: Reply with quote

i think a better idea is:
you go and create something
if you eventually think its worthy of some credit for extraordinary work,
then you go talk to the head of school

rather than having all this silly structure
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Noj
Anonymous
Guest




PostPosted: Sat Apr 12, 2008 4:10 pm    Post subject: Reply with quote

bt where's the incentive to work harder
Back to top
M M J Conolly
Matthew Michael Joseph Conolly



Joined: 10 Mar 2006
Location: 0x8000

PostPosted: Sat Apr 12, 2008 9:25 pm    Post subject: Reply with quote

incentives encourage the output of work
work, does not imply, creative work
_________________
comp2911 tutor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
dave
David Gregory Claridge



Joined: 28 Feb 2007

PostPosted: Mon Apr 21, 2008 5:36 pm    Post subject: Reply with quote

Noj wrote:
bt where's the incentive to work harder


if you really want to do it you will - if you're only motivated by marks or money, you probably won't enjoy being a software developer that much
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CSE Forums Forum Index -> CSE-Soc All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group