RCS file: header.h,v
Working file: header.h
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
this is the header file in which we declare our header file used and our prototype for functions
----------------------------
revision 1.8
date: 2014/08/07 06:25:40; author: root; state: Exp; lines: +1 -1
remove the errors
----------------------------
revision 1.7
date: 2014/08/07 06:20:54; author: root; state: Exp; lines: +8 -0
give the prototype for compression as well as for the compression type.
also give the prototype for the function to find the location of the charcter in the master array.
----------------------------
revision 1.6
date: 2014/08/01 09:48:02; author: root; state: Exp; lines: +1 -0
give the protoype for the codelength.
----------------------------
revision 1.5
date: 2014/08/01 09:38:45; author: root; state: Exp; lines: +1 -1
change the prototype of create_masterarray.
----------------------------
revision 1.4
date: 2014/08/01 09:16:47; author: root; state: Exp; lines: +1 -0
include an string.h header file as use the strlen function in fun.c
----------------------------
revision 1.3
date: 2014/08/01 09:09:13; author: root; state: Exp; lines: +2 -0
give the protype of create_masterarray.
gave the prototype for unique fuction.
----------------------------
revision 1.2
date: 2014/08/01 08:31:46; author: root; state: Exp; lines: +2 -0
we use the fcntl.h header library for the open and write function .
use the stdlib.h header file for the using of malloc fuction in fun.c .
gave the prototype for openfile function
gave the prototype for writefile function
----------------------------
revision 1.1
date: 2014/08/01 07:52:45; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: fun.c,v
Working file: fun.c
head: 1.13
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 13; selected revisions: 13
description:
this is all function file which we use at there
----------------------------
revision 1.13
date: 2014/08/07 06:30:31; author: root; state: Exp; lines: +5 -5
didn't declare the compress 2,3,5,6,7 function so till cometed that.
----------------------------
revision 1.12
date: 2014/08/07 06:29:06; author: root; state: Exp; lines: +2 -2
removed errors
----------------------------
revision 1.11
date: 2014/08/07 06:27:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
----------------------------
revision 1.10
date: 2014/08/07 06:26:33; author: root; state: Exp; lines: +1 -0
remove the errors in the compression4 function
----------------------------
revision 1.9
date: 2014/08/07 06:21:55; author: root; state: Exp; lines: +66 -0
gave the description for the compression fuction.
gave the description for the copmression type function.
and also made a function to find the location of character in the master array .
----------------------------
revision 1.8
date: 2014/08/01 09:48:20; author: root; state: Exp; lines: +8 -0
give the declaration of codelength fuction and calculate code length of master array.
----------------------------
revision 1.7
date: 2014/08/01 09:39:48; author: root; state: Exp; lines: +9 -8
return both ndc and ma by using poitner refrence .
----------------------------
revision 1.6
date: 2014/08/01 09:24:38; author: root; state: Exp; lines: +1 -0
use the lseek function in the create_master array.
----------------------------
revision 1.5
date: 2014/08/01 09:21:47; author: root; state: Exp; lines: +3 -3
*** empty log message ***
----------------------------
revision 1.4
date: 2014/08/01 09:17:41; author: root; state: Exp; lines: +2 -2
return ndc integer instead of ma in create_master array.
put a ; before while in create_master array function
----------------------------
revision 1.3
date: 2014/08/01 09:10:12; author: root; state: Exp; lines: +34 -0
declare the function of create_master array.
declare the fuction of unique which give us a unique character master array.
----------------------------
revision 1.2
date: 2014/08/01 08:34:17; author: root; state: Exp; lines: +12 -2
in it we give the description of openfile function
and also give the description of write file function .
----------------------------
revision 1.1
date: 2014/08/01 07:52:45; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: mdc.c,v
Working file: mdc.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
this is main file for our mdc program
----------------------------
revision 1.8
date: 2014/08/07 06:20:24; author: root; state: Exp; lines: +2 -1
made the compression function.
and get the new fd of compressed file from that
----------------------------
revision 1.7
date: 2014/08/01 09:47:05; author: root; state: Exp; lines: +3 -1
calculate the code length of the mater array.
give a call to codelength function.
----------------------------
revision 1.6
date: 2014/08/01 09:38:07; author: root; state: Exp; lines: +2 -2
get the return value of create master array as char *ma istead of ndc.
----------------------------
revision 1.5
date: 2014/08/01 09:25:54; author: root; state: Exp; lines: +1 -1
correct the errors
----------------------------
revision 1.4
date: 2014/08/01 09:16:14; author: root; state: Exp; lines: +1 -1
remove the error in the 14 line use ma instead of mdc varialble
----------------------------
revision 1.3
date: 2014/08/01 09:07:47; author: root; state: Exp; lines: +6 -1
we make a unique master array and call a function of the create master array.
----------------------------
revision 1.2
date: 2014/08/01 08:29:48; author: root; state: Exp; lines: +3 -1
we create and open a file by calling the open function whose description written in fun.c file .
we write in the file from the buffer by calling a writefile function whose description is also available in the fun.c function.
----------------------------
revision 1.1
date: 2014/08/01 07:52:45; author: root; state: Exp;
Initial revision
=============================================================================
<!--<br /> @page { margin: 0.79in }
PRE.western { font-family: "Liberation Serif" }
PRE.cjk { font-family: "WenQuanYi Zen Hei", monospace }
P { margin-bottom: 0.08in }
--ddddddddddddd
I did the 4 bit compression over here as by using this technique you can store the 2character in just a single byte.
as for the for byte compression you have to use sprintf or the type casting in it .
In the byte compression you use the location of the character which you storred in the array an by using sprintf you convert that integer value into the character and stored that character value in a char variable by shifitng the first char by 4 bit left and right and second char by 4 bit left and OR the both char and stored the value in third char and write that char in your file you can get a compressed file which is exactly the half of size of your actual file.
It looks like you're new here. If you want to get involved, click one of these buttons!