Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functionality to GZip compress/decompress strings #214

Merged
merged 4 commits into from
Jan 25, 2022

Conversation

jedjohan
Copy link
Contributor

GZip string compress/decompress tool. Because I think its usefult, at least for me 😄

Pull request type

Please check the type of change your PR introduces:

  • Feature

What is the new behavior?

Functionality to handle GZip compress/decompress. Placed it in the encode/decode (couldn't find a better place?). Functionality is very similar to HTML encoder/decoder (buttons/fields) but instead does standard .NET GZip

Other information

It is using the "CanBeTreatedByTool" to check if clipboard data trimmedData.StartsWith("H4sI");
Sorry to say I was unable to get the icon functional. Not very good at svg 😞 Maybe someone could help out ?

Quality check

Before creating this PR, have you:

  • Followed the code style guideline as described in CONTRIBUTING.md
  • Verified that the change work in Release build configuration
  • Checked all unit tests pass

@jedjohan jedjohan changed the title Added encoder/decoder "plugin", functionality for GZip compress/decom… Functionality to GZip compress/decompress strings Jan 23, 2022
@btiteux
Copy link
Collaborator

btiteux commented Jan 23, 2022

I have seen that you add the localization file for English only. 
Please add the file for the other languages too

@jedjohan
Copy link
Contributor Author

jedjohan commented Jan 23, 2022

I have seen that you add the localization file for English only.  Please add the file for the other languages too

Just copy en-US file --> all folders or should I actually google translate all langs ?

@btiteux
Copy link
Collaborator

btiteux commented Jan 23, 2022

I have seen that you add the localization file for English only.  Please add the file for the other languages too

Just empty files or should I actually google translate all langs ?

Just copy the English file in the other language, this way the user who want to update the localization can update the file directly

PR Comment: copied resw file to all langs
@AHollowedHunter
Copy link

AHollowedHunter commented Jan 23, 2022

I was working on this same feature yesterday/today in my free time, and created issue #217 and PR #218 for my changes before seeing this PR. I have mentioned the issue above. Not sure what will happen now... but will leave my changes open as I went about adding it as an option to the existing Base64 tool as they are closely linked in this scenario.

@jedjohan regarding getting the icon glyph to work, I had the same exact issue! I installed the included FluentSystemIcons-Regular.ttf font and used an app (Character Map UWP) to browse through the symbols for the right icon :)

@jedjohan
Copy link
Contributor Author

@AHollowedHunter ahh, that must mean its a really good tool to have, 2 gzip PRs in the same day 😄 I don't really care where it ends up (even though I don't really agree that base64 is linked to gzip compression). Guess its a good thing to try to reduce the number of separate tools in a UX sense ? Thanks for the icon tip ! Don't know if I should spend time on it though, depending on which PR that will get merged.

Copy link
Collaborator

@veler veler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
Thank you for your contribution! Overall, it looks good to me. Just a few comments here and there. :-)
I will let @btiteux give the final approval and merge.

Looking forward to get this tool :D As you said, 2 PR for the same thing the same day means something.

As @btiteux mentioned in the other PR, we will keep this one because we see an advantage at having this feature as a separated tool from Base64 Encoder/Decoder => we can, in the futrue, extend it to compress/decompress some gzip files.

@veler veler added this to the v1.0.2.0 milestone Jan 25, 2022
@veler veler linked an issue Jan 25, 2022 that may be closed by this pull request
@btiteux btiteux merged commit 5e4ab1f into DevToys-app:main Jan 25, 2022
veler pushed a commit that referenced this pull request Mar 31, 2023
* Added encoder/decoder "plugin", functionality for GZip compress/decompress
Implemented of CanBeTreatedByTool

* PR Comment: removed redundant line for PRIResource
PR Comment: copied resw file to all langs

* PR Comments: CreateFontIcon + misc texts + removed broken Gzip.svg

Co-authored-by: Johan Eriksson <johan.eriksson@cdon.com>
Co-authored-by: BenjaminT <titeux.benjamin@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GZip compression/decompression to Base64 Encoder/Decoder
4 participants