RCS file: codelength.c,v
Working file: codelength.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This func takes the ma as argument.
Then we calculate the length of ma by using strlen.
Depending on length of ma,this func will return value to compress func.
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:40:48; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress2.c,v
Working file: compress2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:17; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress3.c,v
Working file: compress3.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:32; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress4.c,v
Working file: compress4.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:48; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress5.c,v
Working file: compress5.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:50; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress6.c,v
Working file: compress6.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:53; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compress7.c,v
Working file: compress7.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:43:54; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: compression.c,v
Working file: compression.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Here we declare a pointer to enter the name of file to be opened
then we call the openfile function
----------------------------
revision 1.2 locked by: root;
date: 2018/12/21 17:43:56; author: root; state: Exp; lines: +24 -5
Here we call the codelength func.
Then depending on the codelength of ma,we will call the compressn() func by using switch which takes the codelength as argument.
----------------------------
revision 1.1
date: 2018/12/20 09:13:52; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: createmasterarray.c,v
Working file: createmasterarray.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Here we will create a masterarray of unique characters in the opened file
first we will declare a char pointer to store all unique characters
we will read the opened file character by character with the help of file descriptor
then we will call unique function to check whether the character read is unique or not
if character is unique,then it is stored in master array
otherwise next character is read
we will store all unique characters in master array
this will return the char pointer
----------------------------
revision 1.2 locked by: root;
date: 2018/12/21 17:46:40; author: root; state: Exp; lines: +17 -12
we replaced the malloc with realloc.
we called the unique func by using its func ptr.
----------------------------
revision 1.1
date: 2018/12/20 09:16:27; author: root; state: Exp;
Initial revision
==========
RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This func is used for mapping func ptr with the respective func.
----------------------------
revision 1.1 locked by: root;
date: 2018/12/21 17:48:18; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: main.c,v
Working file: main.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
This is the main function
It will have an infinite while loop
In the while loop,we will call the mainmenu function and we will provide the choice
Based on the choice given,it will call the appropriate function to perform the required task
----------------------------
revision 1.2 locked by: root;
date: 2018/12/21 17:49:06; author: root; state: Exp; lines: +9 -4
First we replaced all funcs with func ptrs.
we call the init() func.
----------------------------
revision 1.1
date: 2018/12/20 09:48:51; author: root; state: Exp;
Initial revision
================================
RCS file: mainmenu.c,v
Working file: mainmenu.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
In this function,we will give the choice to perform the task
It will return the integer choice
----------------------------
revision 1.2 locked by: root;
date: 2018/12/21 17:50:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2018/12/20 09:53:07; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: openfile.c,v
Working file: openfile.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This function is used to open file to be compressed
It will take filename as argument
It will open the file to be compressed in read only mode and provide the file descriptor
It will return fd to compression func
----------------------------
revision 1.1 locked by: root;
date: 2018/12/20 09:58:59; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: unique.c,v
Working file: unique.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
This func is used to check whether the character read is unique or not
This will use the for loop to compare character read with the character in masterarray
If character is already present in ma,then it will return 0 otherwise will store in ma.
----------------------------
revision 1.2 locked by: root;
date: 2018/12/21 17:51:20; author: root; state: Exp; lines: +3 -6
*** empty log message ***
----------------------------
revision 1.1
date: 2018/12/20 11:51:41; author: root; state: Exp;
Initial revision
==================================
RCS file: declaration.h,v
Working file: declaration.h
head: 1.6
branch:
lyword substitution: kv
total revisions: 6; selected revisions: 6
description:
this file would contain for all declarations in the project
declared mainmenu(),exitfunction(), compression(),decompression()
----------------------------
revision 1.6 locked by: jchaudhary;
date: 2018/12/21 10:41:21; author: jchaudhary; state: Exp; lines: +37 -1
declared pointers to all the functions
----------------------------
revision 1.5
date: 2018/12/20 06:04:02; author: jchaudhary; state: Exp; lines: +1 -1
this h
this file would contain all the headers file
stdio.h string.h stdlib.h unistd.h fcntl.h
----------------------------
revision 1.4
date: 2018/12/17 06:53:49; author: jchaudhary; state: Exp; lines: +2 -1
added unique function
----------------------------
revision 1.3
date: 2018/12/14 10:06:25; author: jchaudhary; state: Exp; lines: +2 -2
*** empty log message ***
----------------------------
revision 1.2
date: 2018/12/14 09:49:07; author: jchaudhary; state: Exp; lines: +2 -1
changed return type of openfile function
add new function createmasterarray
----------------------------
revision 1.1
date: 2018/12/12 13:21:40; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: headers.h,v
Working file: headers.h
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this file contains all the included headers and macros
file list: stdio.h stdlib.h string.h unistd.h fcntl.h
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/11 16:06:23; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression2.c,v
Working file: compression2.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
openfile() createmasterarray() length(
replaced by pointers of functions
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:43:07; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression3.c,v
Working file: compression3.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will compress the targeted file when code length is less then 8
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:46:10; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression4.c,v
Working file: compression4.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will be you to compress target file when code length is less then 16
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/22 06:29:45; author: jchaudhary; state: Exp;
Initial revision
===================
Working file: compression5.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will compress the file when code length is less then 32
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:50:07; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression6.c,v
Working file: compression6.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will compress the file when code length is less then 64
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:51:15; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression7.c,v
Working file: compression7.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will compress the file when code length is less then 128
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:52:08; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: compression.c,v
Working file: compression.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
----------------------------
revision 1.2
date: 2018/12/20 06:56:05; author: jchaudhary; state: Exp; lines: +2 -1
this function will use to compress file
openfile function wil be cll to open the file to copress
and openfile will return fd
after that called to createmasterarray function and passed fd to this function
----------------------------
revision 1.1
date: 2018/12/17 07:14:17; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: createmasterarray.c,v
Working file: createmasterarray.c
head: 1.3
branch:
locks: strict
jchaudhary: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
----------------------------
revision 1.3 locked by: jchaudhary;
date: 2018/12/21 10:54:50; author: jchaudhary; state: Exp; lines: +5 -5
malloc is replace by realloc
----------------------------
revision 1.2
date: 2018/12/21 06:24:06; author: jchaudhary; state: Exp; lines: +4 -1
memory allocation updated
melloc function replaced by realloc function
----------------------------
revision 1.1
date: 2018/12/17 07:14:33; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: decompression.c,v
Working file: decompression.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this file will be use to decompress the file
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/20 07:07:10; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: exitfunction.c,v
Working file: exitfunction.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will be use to exit from the code in both situation(EXIT_SUCCESS & EXIT_FAILURE)
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/20 07:07:48; author: jchaudhary; state: Exp;
Initial revision
===================================
RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function contains initilization of all the functions
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/21 10:56:07; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: length.c,v
Working file: length.c
head: 1.3
branch:
locks: strict
jchaudhary: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
----------------------------
revision 1.3 locked by: jchaudhary;
date: 2018/12/22 05:40:32; author: jchaudhary; state: Exp; lines: +23 -4
this function will count the code length or unique array and return an int value according to code length
----------------------------
revision 1.2
date: 2018/12/21 06:25:26; author: jchaudhary; state: Exp; lines: +1 -1
this function will use count to code length using strlen()
and return an int value according to code length
----------------------------
revision 1.1
date: 2018/12/20 07:11:19; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: main.c,v
Working file: main.c
head: 1.2
branch:
locks: strict
jchaudhary: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
this is main function of code
in the main
a mainmenu function will be call in a while(1) loop
mainmenu is enter the choice
1 for compression
2 for decompression
0 for exit
mainmenu returns an int type value enter by the user
and then work according to user choice
----------------------------
revision 1.2 locked by: jchaudhary;
date: 2018/12/22 05:45:11; author: jchaudhary; state: Exp; lines: +6 -5
replaced all the function by the function pointers
----------------------------
revision 1.1
date: 2018/12/20 07:11:31; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: mainmenu.c,v
Working file: mainmenu.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
thil function will be call from main and it wil display chioces to use
1 for compression
2 for decompressinon
0 for exit
and return an int value to main entered by the user choice
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/20 07:19:14; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: openfile.c,v
Working file: openfile.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this function will be use to open the file and will return fd
and ask to user to enter the file name
malloc to store file name
.
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/20 08:09:07; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
RCS file: unique.c,v
Working file: unique.c
head: 1.1
branch:
locks: strict
jchaudhary: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1 locked by: jchaudhary;
date: 2018/12/17 07:15:33; author: jchaudhary; state: Exp;
Initial revision
=============================================================================
It looks like you're new here. If you want to get involved, click one of these buttons!