Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.
/ OOproject Public archive

project for Object Oriented programming, SW Dev year 4 ,GMIT

License

Notifications You must be signed in to change notification settings

Chengxuan/OOproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<----MainFeatures---->

Encode and decode String, URL and file using four algorithms:

Base64< —using apache base64 API

RunLength, Huffman and Lempel Ziv LZ78 <— all codes are write by myself.

=============================if you are using Linux=========================

Use run.sh to check my work.

$> cd to directory

$> sh run.sh $ANT_HOME (your ant home)

============================================================================

<----Compile the Code---->

cd to the folder, do ant in terminal

OR cd to “src” subfolder, do ant in terminal

<- - - - - - -Don’t move the build.xml between different folder— - - - - - - - ->

$>export PATH=$PATH:$ANT_HOME/bin/

$>ant

<----Using the API---->

you should copy “encode” folder if you want to move the dir of jar

add the encoder.jar to your Java class path.

export CLASSPATH=.:${Path to encode}/encoder.jar

<----All methods returns string. You should export them to a file or post them by your self.---->

you can use the api by follow command

EncoderFactory ef = EncoderFactory.getInstance();

Encoder en = ef.getEncoder("Huffman"); //return a Huffman Encoder that can process String.

System.out.println(en.encode(“your string”));

System.out.println(en.decode(en.encode(“your string”)));

en = ef.getFileEncoder("Huffman"); //return a Huffman Encoder that can process Files.

System.out.println(en.encode(“/PathToFile/filename.extension”));

System.out.println(en.decode(en.encode(“/PathToFile/filename.extension”)));

en = ef.getURLEncoder("Huffman"); //return a Huffman Encoder that can process URLs.

System.out.println(en.encode(“http://www.google.ie”));

System.out.println(en.decode(en.encode(“http://www.google.ie”)));

About

project for Object Oriented programming, SW Dev year 4 ,GMIT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published