Thursday, August 31, 2006

zip on unix

Other than Phil Katz and PKWare, you should not forget Info-ZIP.

Info-ZIP is an open source software (BSD like license), support many operating system platform, eg. DOS, unix like OS, including Solaris, Linux and even OS X. Many people have contributed to the project.

I have compiled the lastest Info-ZIP's zip(2.32) and unzip(5.52) program on solaris without much problem.

On solaris, just extract the source code, cd into the directory:-

$ make -f unix/Makefile solaris
$ make -f unix/Makefile install

Even though OS X already came with info-zip, and I have another info-zip install through fink (/sw/bin), but I would like to compile a newer version by myself. Is very easy.

$ make -f unix/Makefile generic or
$ make -f unix/Makefile bsd

Another reason I install the new version is, I have this zipnote command, which help to comment files in the zip archive, which I can't find in my old version (zip-2.1).

$ zipnote > foo.tmp
(edit foo.tmp file)
$ zipnote -w < foo.tmp

$ unzip -l
This zip have foo and bar file
Length Date Time Name
------ ---- ---- ----
37048 08-31-106 18:09 foo
This is foo file
0 08-31-106 18:17 bar
This is bar file
------ -------

This is how you can comment your zip archive, so you don't forget what is inside after some time.

Try it out, compile a zip for yourself, is fun.

Is zip again

Today is Malaysia Merdeka Day (Independent Day), let's celebrate. How do I celebrate? Coding overnight, while other singing karaoke and watching fireworks.

You are not going to believe this, I am still using my floppy diskette to transfer my program from one machine to another. I zip my program, so reading and writing to the diskette will be faster.

Now days, not much people care about zip program, because they store their program or data in their 1GB thumb drive, zip or non-zip make not much different.

Ten or fifteen years ago, zip program is very important to us. There is no thumb drive or CD-Rom storage, hard disk are 40MB in capacity, storage is expensive, we store our data on diskette, zip utility help us a lot.

There is quite a number of compression format and utility tools available:-

lha (.LZH)

For some reason, I have chosen lha as my compression tools, all my old data files are still compress in lha format (.LZH). Arj has a better compress ratio at that time, but is slow, rar is proprietary, lha has a better compress ratio than zip, decompress faster than arj, and I have a tools to convert .LZH to an executable.

I should have chosen zip. Zip is the most common compression format, a lot of tools and utility program is available, as freeware or even open source software. I could hardly find any tools and utility program support lha format. Now I have to convert all my .LZH files to .ZIP.

I learn my lesson now, choose a format which common and open, which will last long. Sacrifice a little bit of compression ratio and program performance is reasonable. May be should thanks Phil Katz, whether he is doing right or wrong, he did contribute to the popularity of zip format.

Saturday, August 26, 2006

Apple Battery Exchange Program

It has been a long long time, I didn't blog anything, my previous blog is Yahoo Finance Badge, is one month old.

Recent big news about Apple is, they are having a battery exchange program, collecting back some ibook G4 and powerbook notebook battery, and exchange a new one for free.

Not all notebook will be affected, should be those manufactured or sold between October 2003 to August 2006. One of my friend's ibook G4 battery serial number drop in between the range, but another friend's powerbook G4 is not. You can check the serial number from Apple website.

Battery serial number range
iBook G4
A1061 ZZ338 - ZZ427
3K429 - 3K611
6C519 - 6C552 ending with S9WA, S9WC or S9WD
PowerBook G4
A1079 ZZ411 - ZZ427
3K428 - 3K611
PowerBook G4
and A1148
3K425 - 3K601
6N530 - 6N551 ending with THTA, THTB, or THTC
6N601 ending with THTC

These batteries containing parts manufactured by Sony, expose to a risk may result in overheating under rare circumstances. If you ask me, I will tell you not just those battery, my ibook G3 is easily overheated as well, you just can't put on your lap after using for some time.

This is not the first time apple do such a program, they have another exchange program earlier for collecting back the batteries manufacture by South Korea LG.

I am having a ibook G3, bought during march 2003, which is already 3 years old. The model and serial number is not in the range, of both exchange program. The good thing is, I am not expose to the risk of battery explosion, the bad thing is I can't exchange a new battery for free.

My ibook battery is left with 'half life', even I have done a full discharge and recharge, so is not cause by the battery memory effect. I am quite disappointed with apple's notebook battery, because it don't last as long as what I expected.

My friend have a ASUS M series notebook, which was bought a few month earlier than my ibook, still running ok without much battery problem. My palm Vx which was bought in year 2000 is still running ok.

Many users complain having overheated problem with apple notebook, including the new macbook pro. Apple claim that notebook should not put on the lap, so you will not get burn or hurt, but some one pointed out in the blog, Apple has a picture showing some people listening mp3 and using notebook on the lap, I can't find the blog, but will show you all next time when I found it.

I like OS X, and I am happy with their battery exchange program. I will not replace my ibook with macbook pro, and I will not recommend anyone to buy it now, until apple solve the overheated problem.