function read & write Image
main function
compression & decompression functions