HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file compress.Compressor by barry
expand copy to clipboardexpand
/*
 {"description" : "Compression API to compress data into a particular file format."
	}
*/

uses io.File

interface Compressor {
	
	/*
	 {"@description" : "Reads all data from ifd, starting from the current read position, and compresses it into ofd. The compressed data will include a file header and other meta-data, according to the compression format being used.",
	 	"ifd" : "The file from which input data (usually uncompressed) is read.",
		"ofd" : "The file to which compressed data (including file headers and meta-data) is written.",
	 	"@return" : "True if successful, false otherwise."
		}
	*/
	bool compress(File ifd, File ofd, opt char filename[])
	
	/*
	 {"@description" : "Reads compressed data from ifd, starting from the current read position, and decompresses it into ofd.",
	 	"ifd" : "The file from which compressed input data is read.",
		"ofd" : "The file to which uncompressed data is written.",
	 	"@return" : "True if successful, false otherwise."
		}
	*/
	bool decompress(File ifd, File ofd)
	
	/*
	 {"@description" : "Reads the filename of the compressed data from ifd (if the compression format supports filenames).",
	 	"ifd" : "The file from which compressed input data is read.",
	 	"@return" : "The filename of the compressed file (if any)."
		}
	*/
	char[] getFileName(File ifd)
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n compress.Compressor -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation