Compendio is a collection of common and noteworthy extension methods, security tools, and filesystem functions generally found in most applications; focusing on extensibility and portability while also keeping code and documentation easy to follow and clear to understand. Most tools found in the library are usually written everytime a developer/team creates a new project which then becomes a repetitive task, and so, this is where Compendio comes in. Being a portable library a developer can reference the library, or copy the source code directly into their project, providing them with more time to focus on business logic and or the core code of their main application.
Note: Compendio uses libraries that contain "unsafe" code and therefore the Allow unsafe code build option must be selected in order to actually build the project. However, this shouldn't be a problem considering that the option has already enabled in the project solution prior to pushing to Github.
- .NET Framework 4.6.1
Compendio comes with a notable amount of tools which range from common extensions which transform strings all the way to methods used to manipulate the local filesystem either in a managed or native way. There are extensions that exist for nearly every common C# type as well as tools for security and constants for certain fields of study such as Mathematics, Physics, and Chemistry. The currently available features are the following:
- Constants
- Mathematics
- Physics
- Chemistry
- IO
- Directories
- Manage files and folders using managed and native APIs
- Explore long paths otherwise restricted by the 260 character path length limit
- Files
- Static and constructed reading, writing, and appending of files using a
FileManagerobject - A large list of common
MimeTypesin a single dictionary - Create files with a path name longer than the typically restrictive 260 character path length limit
- Static and constructed reading, writing, and appending of files using a
- Directories
- Security
SecureRandom— a cryptographically strong random object utilizing aRNGCryptoServiceProvider- Generators
- Create files of a specified size containing cryptographically strong data
- Generate crypto strong passwords of any length, type, and with or without non-alphanumerics
- Cryptography
- Encrypt and decrypt files both synchronously and asynchronously
- Encrypt and decrypt strings both synchronously and asynchronously
- Encrypt and decrypt data both synchronously and asynchronously
- Hashing
- Generate checksums of files, strings, and byte data
- MD5
- RIPEMD150
- SHA1
- SHA256
- SHA384
- SHA512
- Generate checksums of files, strings, and byte data
- Collections
- Search, sort, and merge collections of varying types
- Transformations
- Int
- Convert most common types to an
int
- Convert most common types to an
- Double
- Round a double precision number using the provided precision and
MidpointRoundingobject
- Round a double precision number using the provided precision and
- Byte
- Convert an
intorstringto a byte array - Convert a Base64 encoded
stringinto a byte array filled with its decoded equivalent - Convert a
byte[]into a byte array filled with its Base64 encoded equivalent - Encrypt an array of bytes
- Decrypt an array of bytes
- Merge two byte arrays into a single array
- Convert an
- String
- Obtain the UTF8 encoded
stringequivalent of a byte array - Obtain the Base64 encoded
stringequivalent of a byte array - Convert a
longinto a file size represented as astring - Split a
stringinto anIEnumerable - Create a
List<string>from astring - Reverse a
string - Encrypt a
stringusing AES256 in CBC mode - Decrypt a
stringusing AES256 in CBC mode - Convert a
stringinto its Base64 equivalent - Convert a Base64 encoded
stringinto its plaintext equivalent
- Obtain the UTF8 encoded
- Color
- Convert an RGB color from a string into its
Colorobject equivalent
- Convert an RGB color from a string into its
- XElement
- Extract an
XElementfrom an XML file given the element name - Obtain a value from a specified
XElementwithout throwing an exception
- Extract an
- Data
- Serialize and deserialize any object into an array of bytes that has the
[Serializable]property
- Serialize and deserialize any object into an array of bytes that has the
- Formatters
- Contains an interface to convert a file size of
longinto its shorthandstringrepresentation
- Contains an interface to convert a file size of
- Int
- Validation
- Check if a
stringis a valid email address in context of modern email addresses
- Check if a
Icon: Prosymbols
https://www.flaticon.com/authors/prosymbols
Encryption: sdrapkin
https://github.com/sdrapkin/SecurityDriven.Inferno
Long Paths: peteraritchie
https://github.com/peteraritchie/LongPath
Copyright © ∞ Jason Drawdy
All rights reserved.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the above copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
