From 7d6303070c37aeb087de2e10a9707985e10f4725 Mon Sep 17 00:00:00 2001 From: parmsam Date: Thu, 11 Apr 2024 23:39:59 -0400 Subject: [PATCH] change pkg name to lzstring --- DESCRIPTION | 7 +++++-- LICENSE | 2 +- LICENSE.md | 2 +- NAMESPACE | 2 +- R/cpp11.R | 8 ++++---- R/lzstringr-package.R | 2 +- README.Rmd | 14 +++++++------- README.md | 14 +++++++------- src/cpp11.cpp | 18 +++++++++--------- tests/testthat.R | 4 ++-- 10 files changed, 38 insertions(+), 35 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index dfb01c6..c9b038e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,13 @@ -Package: lzstringr +Package: lzstring Type: Package Title: An R wrapper of lzstring C++ library Version: 0.1.0 Author: Sam Parmar Maintainer: Sam Parmar -Description: An R wrapper of LZ-based compression algorithm implemented in C++ +Description: This package provides an R interface to the lz-string C++ library, + enabling LZ-based compression and decompression of strings directly within + R. This can be particularly useful for reducing the memory footprint of + large strings or for transmitting compressed data. License: MIT + file LICENSE Encoding: UTF-8 LazyData: true diff --git a/LICENSE b/LICENSE index 49454dc..36856d0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ YEAR: 2024 -COPYRIGHT HOLDER: lzstringr authors +COPYRIGHT HOLDER: lzstring authors diff --git a/LICENSE.md b/LICENSE.md index 473f3f3..894fd37 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2024 lzstringr authors +Copyright (c) 2024 lzstring authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NAMESPACE b/NAMESPACE index a44d5a3..61241da 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,4 +4,4 @@ export(compressToBase64) export(compressToEncodedURIComponent) export(decompressFromBase64) export(decompressFromEncodedURIComponent) -useDynLib(lzstringr, .registration = TRUE) +useDynLib(lzstring, .registration = TRUE) diff --git a/R/cpp11.R b/R/cpp11.R index 4acfc7d..62031a7 100644 --- a/R/cpp11.R +++ b/R/cpp11.R @@ -1,17 +1,17 @@ # Generated by cpp11: do not edit by hand compressToEncodedURIComponent_ <- function(bytes) { - .Call(`_lzstringr_compressToEncodedURIComponent_`, bytes) + .Call(`_lzstring_compressToEncodedURIComponent_`, bytes) } decompressFromEncodedURIComponent_ <- function(bytes) { - .Call(`_lzstringr_decompressFromEncodedURIComponent_`, bytes) + .Call(`_lzstring_decompressFromEncodedURIComponent_`, bytes) } compressToBase64_ <- function(bytes) { - .Call(`_lzstringr_compressToBase64_`, bytes) + .Call(`_lzstring_compressToBase64_`, bytes) } decompressFromBase64_ <- function(bytes) { - .Call(`_lzstringr_decompressFromBase64_`, bytes) + .Call(`_lzstring_decompressFromBase64_`, bytes) } diff --git a/R/lzstringr-package.R b/R/lzstringr-package.R index ca92989..2d5d0d4 100644 --- a/R/lzstringr-package.R +++ b/R/lzstringr-package.R @@ -1,5 +1,5 @@ ## usethis namespace: start -#' @useDynLib lzstringr, .registration = TRUE +#' @useDynLib lzstring, .registration = TRUE ## usethis namespace: end NULL diff --git a/README.Rmd b/README.Rmd index 45d650c..55fbdf4 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,14 +15,14 @@ knitr::opts_chunk$set( ) ``` -# lzstringr +# lzstring [![R-CMD-check](https://github.com/parmsam/lzstring-r/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/parmsam/lzstring-r/actions/workflows/R-CMD-check.yaml) -The goal of lzstringr is to provide an R wrapper for the [lzstring C++ library](https://github.com/andykras/lz-string-cpp). [lzstring](https://github.com/pieroxy/lz-string) is originally a JavaScript library that provides fast and efficient string compression and decompression using a [LZ-based algorithm](https://en.wikipedia.org/wiki/Lempel–Ziv–Welch). Credit goes to [Winston Chang](https://github.com/wch) for spotting this missing R package and guiding me over at the R Shinylive repo—check out his awesome contributions which this repo is based on [here](https://github.com/posit-dev/r-shinylive/issues/70) and [here](https://github.com/posit-dev/r-shinylive/pull/71). Also, shoutout to Andy Kras for his implementation in C++ of lzstring, which you can find right [here](https://github.com/andykras/lz-string-cpp), and [pieroxy](https://github.com/pieroxy), the original brain behind lzstring in JavaScript—peek at his work over [here](https://github.com/pieroxy/lz-string). +The goal of lzstring-r is to provide an R wrapper for the [lzstring C++ library](https://github.com/andykras/lz-string-cpp). [lzstring](https://github.com/pieroxy/lz-string) is originally a JavaScript library that provides fast and efficient string compression and decompression using a [LZ-based algorithm](https://en.wikipedia.org/wiki/Lempel–Ziv–Welch). Credit goes to [Winston Chang](https://github.com/wch) for spotting this missing R package and guiding me over at the R Shinylive repo—check out his awesome contributions which this repo is based on [here](https://github.com/posit-dev/r-shinylive/issues/70) and [here](https://github.com/posit-dev/r-shinylive/pull/71). Also, shoutout to Andy Kras for his implementation in C++ of lzstring, which you can find right [here](https://github.com/andykras/lz-string-cpp), and [pieroxy](https://github.com/pieroxy), the original brain behind lzstring in JavaScript—peek at his work over [here](https://github.com/pieroxy/lz-string). ## Installation @@ -38,21 +38,21 @@ devtools::install_github("parmsam/lzstring-r") This is a basic example which shows you how to solve a common problem: ```{r example} -library(lzstringr) +library(lzstring) data = "The quick brown fox jumps over the lazy dog!"; -compressed = lzstringr::compressToBase64(data) +compressed = lzstring::compressToBase64(data) compressed -decompressed = lzstringr::decompressFromBase64(compressed) +decompressed = lzstring::decompressFromBase64(compressed) decompressed ``` ### Shinylive for R ```{r example2-r-shiny} -x <- lzstringr::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKAZwAtaJWAlAB0IdJiw71OY4RBEBiAAQAROADM+cRQFUAkorVFGitKkWluUUooAmzAO6cTi3p1JEA5sxiKAtP98RAFdaRQAeX0VUKA84AH1OWhs4ehZ2ERFFRSUAQXRzWlJqLQDAiCzSQuLFAF5FITAACThqaiJFAGVefgBCBtwM8uzOpJSWKKgIFoMjRT5UINInUszFROTU4zr1scZ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qLQDAiCzSQuLFAF5FITAACThqaiJFAGVefgBCBtwM8uzOpJSWKKgIFoMjRT5UINInUszFROTU4zr1scZ0uSGspV0IBdJETrpk40NjCy0IIJh6OGMiNUV6PmWA1azpUaME5nfZZMFzU6LXQ2Wr1MBfCCcfp-MHUKAvaiwhoAOSeLzeHwRnEQyMOYJgfFhAEYBmSsjAoAAPWEAVgADLTwVkAG5QahBLR1ADMbJRsiyAlpqyUAHlFmcLo1aG5PN4-L8hqg2qQ5aQQUR5VCYXUGjZlaQAArahqyWQKFTqTRrV7c16KNoeWgERSMOAARxCvph7lsDmcrncXlg6v8Ik4LrdEQMQQgBEqJHY80WuEUBr1iwEihAgyOiiVKqjPne5m4Whl1BhADEoIVuGogpiAOJwVjx4zKKxQGNlUv2Vs+-0CtxwGGPZ5u6tE6WKAAqrkUcEZqF9nESJBrVkUsSmzHITiHEdV0eVinszHQM4hzgIfOoy5Dvog1ytRGsIb4ZovuQB7nNKy5Uhgii6NYN4NL6UBprQroNCYX41q86hGFoPAGg2nxaFAixEAylQvq0rDLmCvq+JucAEIsj72LW5RZksiiZpCpAACREoWBCWBAsTLgATJB0FOHmZzmKwqBaDeQ5ar+qySYsXFmm4P7WEmn7ftq7DFmSzJJmoLYWO21BcfYpl8B4KJEuEkTxn67AUhA7CMpKigMoy7mecUgkWBgeawqxPHfIoADUihUnaZIRqCXKMpyXJMHAUAANZOHURLJeCxCYiaYDyAA7CyOQ5MoABCpJcp8RjXFiYBMYUcA1YlaL0I1ADq1mCQU8DmO0UyMtYrxBKg6blBxXnfMIeAovSLblIV5aRmq1ZWYUNn9XASJgGKqwAL6yIdgxKAAwvBwFdHwrAmPkKyIt0rB5Kg7AhLCIQ5n2rpbM6jC-bIYCHQAukAA") y <- jsonlite::fromJSON(x) cat(y$name) cat(y$content) @@ -61,7 +61,7 @@ cat(y$content) ### Shinylive for Python ```{r example3-py-shiny} -x <- lzstringr::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbDOAD1R04LFkw4xUxOmTERUAVzJ4mQiABM4dZfI4AdCPp0YuCsgH0WAGw4a6ACl2RHyxwDlnTAAzKAjJ+9MAEyeAJT64RAAAqq2GBR8ZPoaNExkCXYhiPpMOSpwZPJ0EEw0jhAAVIFioiAmihgQGUzlQQC+jvpgrQC6QA") +x <- lzstring::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbDOAD1R04LFkw4xUxOmTERUAVzJ4mQiABM4dZfI4AdCPp0YuCsgH0WAGw4a6ACl2RHyxwDlnTAAzKAjJ+9MAEyeAJT64RAAAqq2GBR8ZPoaNExkCXYhiPpMOSpwZPJ0EEw0jhAAVIFioiAmihgQGUzlQQC+jvpgrQC6QA") y <- jsonlite::fromJSON(x) cat(y$name) cat(y$content) diff --git a/README.md b/README.md index c640462..ed75c9d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# lzstringr +# lzstring [![R-CMD-check](https://github.com/parmsam/lzstring-r/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/parmsam/lzstring-r/actions/workflows/R-CMD-check.yaml) -The goal of lzstringr is to provide an R wrapper for the [lzstring C++ +The goal of lzstring-r is to provide an R wrapper for the [lzstring C++ library](https://github.com/andykras/lz-string-cpp). [lzstring](https://github.com/pieroxy/lz-string) is originally a JavaScript library that provides fast and efficient string compression @@ -40,15 +40,15 @@ devtools::install_github("parmsam/lzstring-r") This is a basic example which shows you how to solve a common problem: ``` r -library(lzstringr) +library(lzstring) data = "The quick brown fox jumps over the lazy dog!"; -compressed = lzstringr::compressToBase64(data) +compressed = lzstring::compressToBase64(data) compressed #> [1] "CoCwpgBAjgrglgYwNYQEYCcD2B3AdhAM0wA8IArGAWwAcBnCTANzHQgBdwIAbAQwC8AnhAAmmAOYBCIA" -decompressed = lzstringr::decompressFromBase64(compressed) +decompressed = lzstring::decompressFromBase64(compressed) decompressed #> [1] "The quick brown fox jumps over the lazy dog!" ``` @@ -56,7 +56,7 @@ decompressed ### Shinylive for R ``` r -x <- lzstringr::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKAZwAtaJWAlAB0IdJiw71OY4RBEBiAAQAROADM+cRQFUAkorVFGitKkWluUUooAmzAO6cTi3p1JEA5sxiKAtP98RAFdaRQAeX0VUKA84AH1OWhs4ehZ2ERFFRSUAQXRzWlJqLQDAiCzSQuLFAF5FITAACThqaiJFAGVefgBCBtwM8uzOpJSWKKgIFoMjRT5UINInUszFROTU4zr1scZ0uSGspV0IBdJETrpk40NjCy0IIJh6OGMiNUV6PmWA1azpUaME5nfZZMFzU6LXQ2Wr1MBfCCcfp-MHUKAvaiwhoAOSeLzeHwRnEQyMOYJgfFhAEYBmSsjAoAAPWEAVgADLTwVkAG5QahBLR1ADMbJRsiyAlpqyUAHlFmcLo1aG5PN4-L8hqg2qQ5aQQUR5VCYXUGjZlaQAArahqyWQKFTqTRrV7c16KNoeWgERSMOAARxCvph7lsDmcrncXlg6v8Ik4LrdEQMQQgBEqJHY80WuEUBr1iwEihAgyOiiVKqjPne5m4Whl1BhADEoIVuGogpiAOJwVjx4zKKxQGNlUv2Vs+-0CtxwGGPZ5u6tE6WKAAqrkUcEZqF9nESJBrVkUsSmzHITiHEdV0eVinszHQM4hzgIfOoy5Dvog1ytRGsIb4ZovuQB7nNKy5Uhgii6NYN4NL6UBprQroNCYX41q86hGFoPAGg2nxaFAixEAylQvq0rDLmCvq+JucAEIsj72LW5RZksiiZpCpAACREoWBCWBAsTLgATJB0FOHmZzmKwqBaDeQ5ar+qySYsXFmm4P7WEmn7ftq7DFmSzJJmoLYWO21BcfYpl8B4KJEuEkTxn67AUhA7CMpKigMoy7mecUgkWBgeawqxPHfIoADUihUnaZIRqCXKMpyXJMHAUAANZOHURLJeCxCYiaYDyAA7CyOQ5MoABCpJcp8Rj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BgeawqxPHfIoADUihUnaZIRqCXKMpyXJMHAUAANZOHURLJeCxCYiaYDyAA7CyOQ5MoABCpJcp8RjXFiYBMYUcA1YlaL0I1ADq1mCQU8DmO0UyMtYrxBKg6blBxXnfMIeAovSLblIV5aRmq1ZWYUNn9XASJgGKqwAL6yIdgxKAAwvBwFdHwrAmPkKyIt0rB5Kg7AhLCIQ5n2rpbM6jC-bIYCHQAukAA") y <- jsonlite::fromJSON(x) cat(y$name) #> app.R @@ -120,7 +120,7 @@ cat(y$content) ### Shinylive for Python ``` r -x <- lzstringr::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbDOAD1R04LFkw4xUxOmTERUAVzJ4mQiABM4dZfI4AdCPp0YuCsgH0WAGw4a6ACl2RHyxwDlnTAAzKAjJ+9MAEyeAJT64RAAAqq2GBR8ZPoaNExkCXYhiPpMOSpwZPJ0EEw0jhAAVIFioiAmihgQGUzlQQC+jvpgrQC6QA") +x <- lzstring::decompressFromEncodedURIComponent("NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbDOAD1R04LFkw4xUxOmTERUAVzJ4mQiABM4dZfI4AdCPp0YuCsgH0WAGw4a6ACl2RHyxwDlnTAAzKAjJ+9MAEyeAJT64RAAAqq2GBR8ZPoaNExkCXYhiPpMOSpwZPJ0EEw0jhAAVIFioiAmihgQGUzlQQC+jvpgrQC6QA") y <- jsonlite::fromJSON(x) cat(y$name) #> app.py diff --git a/src/cpp11.cpp b/src/cpp11.cpp index a7e1bdb..0ff8982 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -7,28 +7,28 @@ // code.cpp std::u16string compressToEncodedURIComponent_(std::vector bytes); -extern "C" SEXP _lzstringr_compressToEncodedURIComponent_(SEXP bytes) { +extern "C" SEXP _lzstring_compressToEncodedURIComponent_(SEXP bytes) { BEGIN_CPP11 return cpp11::as_sexp(compressToEncodedURIComponent_(cpp11::as_cpp>>(bytes))); END_CPP11 } // code.cpp std::u16string decompressFromEncodedURIComponent_(std::vector bytes); -extern "C" SEXP _lzstringr_decompressFromEncodedURIComponent_(SEXP bytes) { +extern "C" SEXP _lzstring_decompressFromEncodedURIComponent_(SEXP bytes) { BEGIN_CPP11 return cpp11::as_sexp(decompressFromEncodedURIComponent_(cpp11::as_cpp>>(bytes))); END_CPP11 } // code.cpp std::u16string compressToBase64_(std::vector bytes); -extern "C" SEXP _lzstringr_compressToBase64_(SEXP bytes) { +extern "C" SEXP _lzstring_compressToBase64_(SEXP bytes) { BEGIN_CPP11 return cpp11::as_sexp(compressToBase64_(cpp11::as_cpp>>(bytes))); END_CPP11 } // code.cpp std::u16string decompressFromBase64_(std::vector bytes); -extern "C" SEXP _lzstringr_decompressFromBase64_(SEXP bytes) { +extern "C" SEXP _lzstring_decompressFromBase64_(SEXP bytes) { BEGIN_CPP11 return cpp11::as_sexp(decompressFromBase64_(cpp11::as_cpp>>(bytes))); END_CPP11 @@ -36,15 +36,15 @@ extern "C" SEXP _lzstringr_decompressFromBase64_(SEXP bytes) { extern "C" { static const R_CallMethodDef CallEntries[] = { - {"_lzstringr_compressToBase64_", (DL_FUNC) &_lzstringr_compressToBase64_, 1}, - {"_lzstringr_compressToEncodedURIComponent_", (DL_FUNC) &_lzstringr_compressToEncodedURIComponent_, 1}, - {"_lzstringr_decompressFromBase64_", (DL_FUNC) &_lzstringr_decompressFromBase64_, 1}, - {"_lzstringr_decompressFromEncodedURIComponent_", (DL_FUNC) &_lzstringr_decompressFromEncodedURIComponent_, 1}, + {"_lzstring_compressToBase64_", (DL_FUNC) &_lzstring_compressToBase64_, 1}, + {"_lzstring_compressToEncodedURIComponent_", (DL_FUNC) &_lzstring_compressToEncodedURIComponent_, 1}, + {"_lzstring_decompressFromBase64_", (DL_FUNC) &_lzstring_decompressFromBase64_, 1}, + {"_lzstring_decompressFromEncodedURIComponent_", (DL_FUNC) &_lzstring_decompressFromEncodedURIComponent_, 1}, {NULL, NULL, 0} }; } -extern "C" attribute_visible void R_init_lzstringr(DllInfo* dll){ +extern "C" attribute_visible void R_init_lzstring(DllInfo* dll){ R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); diff --git a/tests/testthat.R b/tests/testthat.R index 40705f5..ea5a613 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -7,6 +7,6 @@ # * https://testthat.r-lib.org/reference/test_package.html#special-files library(testthat) -library(lzstringr) +library(lzstring) -test_check("lzstringr") +test_check("lzstring")