From 778d15f44b3255534f9c08b1954eafe6cfdb7a61 Mon Sep 17 00:00:00 2001 From: ForeverZer0 Date: Tue, 24 Aug 2021 23:34:56 -0400 Subject: [PATCH] Updated README.md, added CODE_OF_CONDUCT.md and LICENSE.txt --- .gitignore | 3 +- CODE_OF_CONDUCT.md | 75 +++++++++++++++++++++++++++++++++++++ LICENSE.txt | 21 +++++++++++ README.md | 18 ++++++++- SharpNBT/CompressionType.cs | 1 + SharpNBT/NbtFile.cs | 1 - 6 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 LICENSE.txt diff --git a/.gitignore b/.gitignore index add57be..f2a0ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ bin/ obj/ /packages/ riderModule.iml -/_ReSharper.Caches/ \ No newline at end of file +/_ReSharper.Caches/ +Documentation/ \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..bede98f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Use commonsense, which by definition does not need explanation +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Not feeling compelled to try and use a "group" you choose to identify with to elevate your position + + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Pushing your political ideologies onto others +* Trolling, insulting/derogatory comments, and personal attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at efreed09@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6c50368 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Eric Freed + +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. \ No newline at end of file diff --git a/README.md b/README.md index f0dfbd6..254b88e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A CLS-compliant implementation of the Named Binary Tag (NBT) specifications (Jav * **Java/Bedrock Support:** Supports all NBT protocols used by different versions of Minecraft, including: Java, Bedrock (file protocol), and Bedrock (network protocol), including full support for either GZip or ZLib compression. * **Ease-of-use:** An intuitive API design, following the style and conventions of the .NET runtime, with full Intellisense for every public member: Spend more time being productive and less time digging through documentation. -* **Performance:** Leverages the power of modern C# language features, including `Span`, `MemoryMarshal`, etc. This allows for a type-safe way to reinterpret raw buffers without pointers or making unnecessary copies of buffers, a common pitfall with serialization in type-safe languages. +* **Performance:** Leverages the power of modern C# language features, including `Span` with `stackalloc`, `MemoryMarshal`, etc. This allows for a type-safe way to reinterpret raw buffers without pointers or making unnecessary copies of buffers, a common pitfall with serialization in type-safe languages. * **Concurrency:** Includes standard async/await concurrency patterns for reading and writing. * **Cross-platform and cross-language support:** Fully CLR compliant and build against .NET STandard 2.1, allowing supports for any CLR language (i.e. C#, Visual Basic, F#, etc.) for the following runtime versions or greater: * .NET Standard 2.1 @@ -19,6 +19,7 @@ A CLS-compliant implementation of the Named Binary Tag (NBT) specifications (Jav * Xamarin.Mac 5.16 * Xamarin.Android 10.0 * Unity 2021.2.0b6 +* **Callbacks:** Can subscribe to events that get a callback as the parser steps through a stream to get immediate feedback without waiting for completion. ## Usage @@ -29,3 +30,18 @@ Reading an NBT document can be as simple as a one-liner: ```csharp CompoundTag tag = NbtFile.Read("/path/to/file.nbt", FormatOptions.Java, CompressionType.AutoDetect); ``` + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/ForeverZer0/SharpNBT. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. + +Pull requests are always welcome. + +## License + +The project is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). + + +## Code of Conduct + +Everyone interacting in the SharpNBT project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ForeverZer0/SharpNBT/blob/master/CODE_OF_CONDUCT.md). \ No newline at end of file diff --git a/SharpNBT/CompressionType.cs b/SharpNBT/CompressionType.cs index 7142d98..bfc81c7 100644 --- a/SharpNBT/CompressionType.cs +++ b/SharpNBT/CompressionType.cs @@ -26,6 +26,7 @@ namespace SharpNBT /// /// Automatically detect compression using magic numbers. /// + /// This is not a valid value when specifying a compression type for writing. AutoDetect = 0xFF } diff --git a/SharpNBT/NbtFile.cs b/SharpNBT/NbtFile.cs index db67165..8a7af76 100644 --- a/SharpNBT/NbtFile.cs +++ b/SharpNBT/NbtFile.cs @@ -7,7 +7,6 @@ using SharpNBT.ZLib; namespace SharpNBT { - /// /// Provides static convenience methods for working with NBT-formatted files, including both reading and writing. ///