-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slightly improve README to clarify issue with UTF16 and Safari
- Loading branch information
1 parent
03d23eb
commit 9daf2ac
Showing
1 changed file
with
6 additions
and
10 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,24 +1,20 @@ | ||
lz-string-csharp | ||
================ | ||
|
||
C# Class implementation of LZ-String javascript | ||
|
||
Based on the LZ-String javascript found here: http://pieroxy.net/blog/pages/lz-string/index.html | ||
C# Class implementation of [lz-string](http://pieroxy.net/blog/pages/lz-string/index.html) (based on https://github.com/pieroxy/lz-string) | ||
|
||
|
||
## Installation | ||
|
||
- Add the NuGet package to your project: `Install-Package LZStringCSharp` | ||
|
||
- Install with NuGet: `Install-Package LZStringCSharp`, or; | ||
- Downloaded from the [Releases](https://github.com/jawa-the-hutt/lz-string-csharp/releases) page | ||
|
||
## Please Note: | ||
|
||
If you are using this in a web service and are sending in strings that are compressed by the Javascript version of LZ-String, then you will want to use the Javascript function `compressToUTF16`. | ||
## Please Note | ||
|
||
If you use just the regular Javascript `compress` function, then depending on the data in the string, it may not decompress correctly on the web service side. However, if you are using the `compress` function built into lz-string-csharp, then you should be ok to use the regular `decompress` function included. | ||
If you plan on using this library for data sent by the browser (e.g. compressed in JavaScript in the browser, and sent to the server using HTTP), do *not* use `compressToUTF16` and `DecompressFromUTF16`. Safari will mangle up the data by converting to UTF-8, breaking the actual bytes of the request. Instead, you should use `compressToEncodedURIComponent` `DecompressFromEncodedURIComponent`. | ||
|
||
|
||
## Contributors ## | ||
## Contributors | ||
|
||
lz-string-csharp was created by [jawa-the-hutt](https://github.com/jawa-the-hutt), with several necessary improvements made by [christianrondeau](https://github.com/christianrondeau) | ||
|