Skip to content

Commit

Permalink
fix warnings by adding roxygen2 and hpp to h
Browse files Browse the repository at this point in the history
  • Loading branch information
parmsam committed Apr 10, 2024
1 parent ce1e5f8 commit a07a949
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 5 deletions.
48 changes: 44 additions & 4 deletions R/lzstringr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,62 @@ safe_decompress <- function(string, f) {
chr_result
}

#' @export compressToBase64
#' Compress a string to Base64
#'
#' This function takes a string as input and returns a compressed version of the string in Base64 format.
#'
#' @param string A character string to be compressed.
#' @return A character string representing the compressed input string in Base64 format.
#' @export
#' @examples
#' \dontrun{
#' compressToBase64("Hello, world!")
#' }
compressToBase64 <- function(string) {
safe_compress(string, compressToBase64_)
}

#' @export decompressFromBase64
#' Decompress a string from Base64
#'
#' This function takes a compressed string in Base64 format as input and returns the decompressed version of the string.
#'
#' @param string A character string in Base64 format to be decompressed.
#' @return A character string representing the decompressed input string.
#' @export
#' @examples
#' \dontrun{
#' decompressFromBase64(compressed_string)
#' }
decompressFromBase64 <- function(string) {
safe_decompress(string, decompressFromBase64_)
}

#' @export compressToEncodedURIComponent
#' Compress a string to Encoded URI Component
#'
#' This function takes a string as input and returns a compressed version of the string in Encoded URI Component format.
#'
#' @param string A character string to be compressed.
#' @return A character string representing the compressed input string in Encoded URI Component format.
#' @export
#' @examples
#' \dontrun{
#' compressToEncodedURIComponent("Hello, world!")
#' }
compressToEncodedURIComponent <- function(string) {
safe_compress(string, compressToEncodedURIComponent_)
}

#' @export decompressFromEncodedURIComponent
#' Decompress a string from Encoded URI Component
#'
#' This function takes a compressed string in Encoded URI Component format as input and returns the decompressed version of the string.
#'
#' @param string A character string in Encoded URI Component format to be decompressed.
#' @return A character string representing the decompressed input string.
#' @export
#' @examples
#' \dontrun{
#' decompressFromEncodedURIComponent(compressed_string)
#' }
decompressFromEncodedURIComponent <- function(string) {
safe_decompress(string, decompressFromEncodedURIComponent_)
}
22 changes: 22 additions & 0 deletions man/compressToBase64.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/compressToEncodedURIComponent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/decompressFromBase64.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/decompressFromEncodedURIComponent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/code.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <cpp11.hpp>
using namespace cpp11;
#include <codecvt>
#include "lz-string.hpp"
#include "lz-string.h"
#include <string>
#include <vector>
#include <iostream>
Expand Down
File renamed without changes.

0 comments on commit a07a949

Please sign in to comment.