Skip to content

About

A Project made under guidance of ACCIOJOBB

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Compressor Decompressor

The Compressor Decompressor (Codec) minor project involves implementing the GZIP compression algorithm to compress and decompress files for efficient storage or transmission. GZIP is a widely used algorithm that can significantly reduce the size of files without loss of quality.

RAVI RAJ

Technology Used

- Java
	○ Java.io.*
		§ It provide set of input stream and output stream
- Java Swing 
	○ It is used to used lightweight and system-independent application
	○ Part of JFC
- Used Jframe
- JFileChooser
	○ All file choosers

File Input Stream

  • file input stream is a mechanism for reading data from a file in the form of a stream of bytes. It is a type of input stream that allows you to read data from a file one byte at a time or in a block of bytes.
  • FileInputStream is a subclass of InputStream class.
  • It is used to read binary data like images, audio, video, etc.
  • It is used to read text data from a file using InputStreamReader.
  • It throws FileNotFoundException if the file is not found.
  • It throws an IOException if there is an error while reading the file.

File Output Stream

  • file output stream is a mechanism for writing data to a file in the form of a stream of bytes. It is a type of output stream that allows you to write data to a file one byte at a time or in a block of bytes.
  • FileOutputStream is a subclass of OutputStream class.
  • It is used to write binary data like images, audio, video, etc.
  • It is used to write text data to a file using OutputStreamWriter.
  • It throws FileNotFoundException if the file is not found. It throws an IOException if there is an error while writing to the file.

GZIP input stream:

- A subclass of Java's InputStream that provides a convenient way to read compressed data in the GZIP file format. 
- Reads compressed data from a GZIP input stream and decompresses it on the fly, returning uncompressed data to the caller.

Can be used in conjunction with a FileInputStream to read GZIP-compressed data from a file.

GZIP output stream:

- A subclass of Java's OutputStream that provides a convenient way to write compressed data in the GZIP file format.
- Accepts uncompressed data as input and compresses it using the GZIP algorithm before writing it to an output stream.
- Can be used in conjunction with a FileOutputStream to write GZIP-compressed data to a file.

Can optionally include a header and footer with metadata such as the original file name, modification time, and operating system used to create the file.

Action Listener is in Java:

- An ActionListener is an interface in Java's Swing GUI toolkit.
- It is used to handle events that occur when a user interacts with a component that generates an action, such as a button press or menu selection.
- When an action occurs, the component sends an event to all registered action listeners.
- To use an action listener, you need to implement the ActionListener interface and override its actionPerformed method.
- The actionPerformed method is called whenever an action event is generated by the component.
- Inside the actionPerformed method, you can write code to respond to the user's action, such as updating a label or launching a new window.
- You can register an action listener with a component using the addActionListener method.
- You can unregister an action listener with a component using the removeActionListener method.
- You can register multiple action listeners with a single component, and each listener will be notified when the action occurs.

About

A Project made under guidance of ACCIOJOBB

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages