From 93e364a0a98d23542509b317ee8dd453045a1df7 Mon Sep 17 00:00:00 2001 From: Mohsen Seifi Date: Wed, 14 Mar 2018 20:44:04 +0330 Subject: [PATCH] Added compression document --- LICENSE.md | 8 +++++--- docs/README.md | 5 +++-- docs/Services/Compression.md | 32 ++++++++++++++++++++++++++++++++ docs/_sidebar.md | 8 +++++--- 4 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 docs/Services/Compression.md diff --git a/LICENSE.md b/LICENSE.md index 6f11f86ae..c0b0f9793 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index ed2780130..255ef74aa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,6 @@ -# What is Olive? -Olive is a framework for more productive cross platform .NET solutions. It provides a whole set of productivity tools to make .NET development easier, cleaner and more expressive. It's available under the GPLv3 license. +# What is Olive + +Olive is a framework built top of .NET for more productive cross platform software development in .NET solutions. It provides a whole set of productivity tools to make .NET development easier, cleaner and more expressive. It's available under the GPLv3 license. Olive is a .NET Standard 2.0 library and so compatible with .NET Framework 4.6.1, .NET Core 2.0, Mono 5.4, Xamarin.iOS 10.14, Xamarin.Mac 3.8, Xamarin.Android 7.5 and UWP. diff --git a/docs/Services/Compression.md b/docs/Services/Compression.md new file mode 100644 index 000000000..56b72eae7 --- /dev/null +++ b/docs/Services/Compression.md @@ -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. \ No newline at end of file diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 7220d607c..52f1f7944 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -3,11 +3,12 @@ * [What is Olive?](README.md) * [.NET Extensions](Core/Extensions.md) * [Utility classes](Core/Utilities.md) + * [change log](ChangeLog.md) * Microservices Architecture * [Overview](Microservices/Overview.md) * [Environment Setup](Microservices/Setup.md) - * [Private Nuget Server](Microservices/PrivateNuget.md) + * [Private Nuget Server](Microservices/PrivateNuget.md) * [Security (Auth)](Microservices/Security.md) * [Urls and Addressing](Microservices/Addressing.md) * [Creating a new microservice](Microservices/Create.New.md) @@ -16,7 +17,7 @@ * [Build server: Jenkins](Microservices/Jenkins.md) * Web Api and Integration - * [ASP.NET WebApi](Api/WebApi.md) + * [RESTful WebApi](Api/WebApi.md) * [ApiClient](Api/ApiClient.md) * [Api Proxy](Api/Proxy.md) * [Api Versioning](Api/Versioning.md) @@ -32,10 +33,11 @@ * Olive Javascript Fx (MvcJS) - * [Overview](MvcJS/Overview.md) + * [Overview](MvcJS/Overview.md) * Olive Plugins + * [Compression](Services/Compression.md) * [Email notifications]() * [SMS notifications]() * [GeoLocation]()