-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# License Agreement | ||
|
||
By accessing Olive, you are agreeing to the following licensing terms. | ||
If you do not agree to these terms, do not access Olive. | ||
If you do not agree to these terms, do not access Olive. | ||
|
||
## Free Open Source License | ||
|
||
Your license to the Olive source and/or binaries is governed by the GNU General Public License as described here: | ||
https://www.gnu.org/licenses/gpl-3.0.en.html | ||
[https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.gnu.org/licenses/gpl-3.0.en.html) | ||
|
||
Note: If you want to use Olive under this license you should also release the source code of your software under the same terms. | ||
|
||
## Commercial License | ||
If you do not wish to release the source of the software you build using Olive, you may contact Geeks Ltd to ask for a Commercial License Agreement. | ||
|
||
If you do not wish to release the source of the software you build using Olive, you may contact Geeks Ltd to ask for a Commercial License Agreement. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Olive.Compression | ||
|
||
This library will get you *fluent methods* to compress and decompress your files and folders. | ||
|
||
## Getting started | ||
|
||
First you need to add the [Olive.Compression](https://www.nuget.org/packages/Olive.Compression/) NuGet package : `Install-Package Olive.Compression -Version 1.0.16` . | ||
Now add `using Olive;` in top of your csharp file and start using `Olive.Compression` fluent methods! | ||
|
||
### Compression | ||
|
||
It's really easy to compress a folder. Just make a **DirectoryInfo** object then make a compressed file using `Compress()`extension method. Here is a full example: | ||
|
||
```cs | ||
var folder = new DirectoryInfo("e:\\somewhere"); | ||
var file = new FileInfo("e:\\somewhereelse\\something.zip"); | ||
folder.Compress(CompressionFormat.Zip, file, overwrite: true); | ||
``` | ||
|
||
You can compress your folder either in formats of **Zip** , **GZip** and **Tar**. | ||
|
||
### Decompression | ||
|
||
You can decompress your compressed file into a directory by making a **FileInfo** object then decompress it into a directory using `decompress()`extension method; Here is an example: | ||
|
||
```cs | ||
var file = new FileInfo("e:\\somewhereelse\\something.zip"); | ||
var folder = new DirectoryInfo("e:\\somewhere"); | ||
file.Decompress(folder); | ||
``` | ||
|
||
You can decompress archives with the formats of **Gzip**, **Zip**, **7Zip**, **Rar** and **Tar** with this fluent method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters