CRAN Package Check Results for Package RcppMsgPack

Last updated on 2018-10-17 22:51:52 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2.2 38.32 39.48 77.80 ERROR
r-devel-linux-x86_64-debian-gcc 0.2.2 33.41 31.72 65.13 ERROR
r-devel-linux-x86_64-fedora-clang 0.2.2 105.23 ERROR
r-devel-linux-x86_64-fedora-gcc 0.2.2 97.94 ERROR
r-devel-windows-ix86+x86_64 0.2.2 126.00 121.00 247.00 ERROR
r-patched-linux-x86_64 0.2.2 36.86 35.59 72.45 ERROR
r-patched-solaris-x86 0.2.2 47.60 ERROR
r-release-linux-x86_64 0.2.2 42.90 36.76 79.66 ERROR
r-release-windows-ix86+x86_64 0.2.2 105.00 124.00 229.00 ERROR
r-release-osx-x86_64 0.2.2 NOTE
r-oldrel-windows-ix86+x86_64 0.2.2 138.00 110.00 248.00 ERROR
r-oldrel-osx-x86_64 0.2.2 NOTE

Check Details

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’ [0s/1s]
     Running ‘tests.r’ [10s/10s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 831.8427 854.0144 881.5488 879.1677 888.6918 1014.518
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 16.06 16.567 45.6683 16.9375 18.235 300.948 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.2.2
Check: re-building of vignette outputs
Result: WARN
    Error in re-building vignettes:
     ...
    Quitting from lines 28-34 (vignette.rmd)
    Error: processing vignette ‘vignette.rmd’ failed with diagnostics:
    object ‘xpk’ not found
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’ [0s/1s]
     Running ‘tests.r’ [7s/11s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 616.9495 688.9967 817.0116 838.8491 947.2728 991.0168
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 9.391 9.637 43.0324 9.893 10.333 337.972 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.2.2
Check: installed package size
Result: NOTE
     installed size is 10.2Mb
     sub-directories of 1Mb or more:
     include 7.0Mb
     libs 2.8Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-windows-ix86+x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’
     Running ‘tests.r’ [12s/14s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: seconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 1.024102 1.072019 1.19681 1.139383 1.291915 1.565603
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 17.79 18.689 67.1671 20.273 22.181 481.852 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’
     Running ‘tests.r’ [10s/13s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 790.1153 922.7661 1035.156 1048.307 1184.974 1299.034
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 18.39 18.467 59.9183 19.1725 19.747 425.447 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.2.2
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'simpleTests.R' [0s]
     Running 'tests.r' [15s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: seconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 1.002243 1.07835 1.15272 1.172903 1.221731 1.267312
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 26.331 27.099 34.2021 27.4835 29.683 92.191 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.2.2
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'simpleTests.R' [0s]
     Running 'tests.r' [13s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 939.1228 1015.746 1040.986 1044.043 1060.499 1181.675
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 27.726 28.215 33.8303 29.577 31.149 71.167 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’ [0s/0s]
     Running ‘tests.r’ [9s/10s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 617.7283 670.3144 815.4552 703.823 1013.98 1193.488
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 14.568 15.178 347.9017 25.1585 28.926 3275.255 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-patched-linux-x86_64

Version: 0.2.2
Check: whether package can be installed
Result: ERROR
    Installation failed.
Flavor: r-patched-solaris-x86

Version: 0.2.2
Check: tests
Result: ERROR
     Running ‘simpleTests.R’ [0s/0s]
     Running ‘tests.r’ [10s/11s]
    Running the tests in ‘tests/tests.r’ failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('图书,通常在狭义上的理解是带有文字和图像的纸张的集合。书通常由墨水、纸张、羊皮纸或者其他材料固定在书脊上组成。组成书的一张纸称为一张,一张的一面称为一页。但随着科学技术的发展,狭义图书的概念也在扩展,制作书的材料也在改变,如电子格式的电子书。从广义理解的图书,则是一切传播讯息的媒介。书也指文学作品或者其中的一部分。在图书馆信息学中,书被称为专著,以区别于杂志、学术期刊、报纸等连载期刊。所有的书面作品(包括图书)的主体是文学。在小说和一些类型(如传记)中,书可能还要分成卷。对书特别喜爱的人被称为爱书者或藏书家,更随意的称呼是书虫或者书呆子。买书的地方叫书店,图书馆则是可以借阅书籍的地方。2010年,谷歌公司估计,从印刷术发明至今,大概出版了一亿三千万本不同书名的书籍。[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 784.6215 818.1554 916.4069 891.7563 975.7083 1145.962
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 15.761 16.008 48.2063 16.665 17.059 330.517 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-release-linux-x86_64

Version: 0.2.2
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'simpleTests.R' [0s]
     Running 'tests.r' [15s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: seconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 1.095993 1.215146 1.220127 1.243315 1.257361 1.272011
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 30.521 31.498 37.7144 31.848 32.406 88.489 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.2.2
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'simpleTests.R' [1s]
     Running 'tests.r' [14s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: seconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 1.036221 1.089851 1.118412 1.131197 1.150577 1.179442
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 28.845 29.194 36.2131 29.474 30.87 93.099 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.2.2
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'simpleTests.R' [0s]
     Running 'tests.r' [15s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: seconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 1.007612 1.093072 1.130918 1.141321 1.16673 1.231066
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 24.863 25.492 33.6285 26.1205 28.146 95.892 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.2.2
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'simpleTests.R' [0s]
     Running 'tests.r' [14s]
    Running the tests in 'tests/tests.r' failed.
    Complete output:
     > # Tests for testing out the functionality of the package, to make sure it isn't broken
     >
     > # some references
     >
     > # //https://github.com/msgpack/msgpack-c/blob/401460b7d99e51adc06194ceb458934b359d2139/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp
     > # //https://stackoverflow.com/questions/44725299/messagepack-c-how-to-iterate-through-an-unknown-data-structure
     > # //https://stackoverflow.com/questions/37665361/how-to-determine-the-class-of-object-stored-in-sexp-in-rcpp
     > # //https://stackoverflow.com/questions/12954852/booststatic-visitor-with-multiple-arguments
     > # //https://stackoverflow.com/questions/25172419/how-can-i-get-the-sexptype-of-an-sexp-value
     > # //https://github.com/wch/r-source/blob/48536f1756a88830076023db9566fbb2c1dbb29b/src/include/Rinternals.h#L1178-L1214
     > # //https://stackoverflow.com/questions/16131462/how-to-use-boost-library-in-c-with-rcpp
     >
     >
     > library(RcppMsgPack)
     >
     > # stopifnot <- function(...) cat(..., "\n")
     >
     > # Test atomic types
     >
     > # integer
     > xpk <- msgpack_pack(1L)
     > stopifnot(identical(msgpack_unpack(xpk), 1L))
     >
     > # double
     > xpk <- msgpack_pack(1.54)
     > stopifnot(identical(msgpack_unpack(xpk), 1.54))
     >
     > # string
     > xpk <- msgpack_pack("sdfsdf")
     > stopifnot(identical(msgpack_unpack(xpk), "sdfsdf"))
     >
     > # raw
     > xpk <- msgpack_pack(as.raw(c(0x28, 0x4F)))
     > stopifnot(identical(msgpack_unpack(xpk), as.raw(c(0x28, 0x4F))))
     >
     > # boolean
     > xpk <- msgpack_pack(T)
     > stopifnot(msgpack_unpack(xpk))
     >
     > # nil
     > xpk <- msgpack_pack(NULL)
     > stopifnot(is.null(msgpack_unpack(xpk)))
     >
     > # ext
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_unpack(xpk), x))
     >
     >
     > if (Sys.info()[['sysname']] != "Windows") {
     + ## unicode or something characters - note this doesn't always work if you copy/paste into a terminal because of how terminals encode text, but if you source this file it works
     + x <- list('å<c2><9b>¾ä¹¦ï¼<c2><8c>é<c2><80><c2><9a>常å<c2><9c>¨ç<c2><8b>­ä¹<c2><89>ä¸<c2><8a>ç<c2><9a><c2><84>ç<c2><90><c2><86>解æ<c2><98>¯å¸¦æ<c2><9c><c2><89>æ<c2><96><c2><87>å­<c2><97>å<c2><92><c2><8c>å<c2><9b>¾å<c2><83><c2><8f>ç<c2><9a><c2><84>纸张ç<c2><9a><c2><84>é<c2><9b><c2><86>å<c2><90><c2><88>ã<c2><80><c2><82>书é<c2><80><c2><9a>常ç<c2><94>±å¢¨æ°´ã<c2><80><c2><81>纸张ã<c2><80><c2><81>ç¾<c2><8a>ç<c2><9a>®çº¸æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä»<c2><96>æ<c2><9d><c2><90>æ<c2><96><c2><99>å<c2><9b>ºå®<c2><9a>å<c2><9c>¨ä¹¦è<c2><84><c2><8a>ä¸<c2><8a>ç»<c2><84>æ<c2><88><c2><90>ã<c2><80><c2><82>ç»<c2><84>æ<c2><88><c2><90>书ç<c2><9a><c2><84>ä¸<c2><80>张纸称为ä¸<c2><80>å¼ ï¼<c2><8c>ä¸<c2><80>å¼ ç<c2><9a><c2><84>ä¸<c2><80>é<c2><9d>¢ç§°ä¸ºä¸<c2><80>页ã<c2><80><c2><82>ä½<c2><86>é<c2><9a><c2><8f>ç<c2><9d><c2><80>ç§<c2><91>å­¦æ<c2><8a><c2><80>æ<c2><9c>¯ç<c2><9a><c2><84>å<c2><8f><c2><91>å±<c2><95>ï¼<c2><8c>ç<c2><8b>­ä¹<c2><89>å<c2><9b>¾ä¹¦ç<c2><9a><c2><84>æ¦<c2><82>念ä¹<c2><9f>å<c2><9c>¨æ<c2><89>©å±<c2><95>ï¼<c2><8c>å<c2><88>¶ä½<c2><9c>书ç<c2><9a><c2><84>æ<c2><9d><c2><90>æ<c2><96><c2><99>ä¹<c2><9f>å<c2><9c>¨æ<c2><94>¹å<c2><8f><c2><98>ï¼<c2><8c>å¦<c2><82>ç<c2><94>µå­<c2><90>æ ¼å¼<c2><8f>ç<c2><9a><c2><84>ç<c2><94>µå­<c2><90>书ã<c2><80><c2><82>ä»<c2><8e>广ä¹<c2><89>ç<c2><90><c2><86>解ç<c2><9a><c2><84>å<c2><9b>¾ä¹¦ï¼<c2><8c>å<c2><88><c2><99>æ<c2><98>¯ä¸<c2><80>å<c2><88><c2><87>ä¼ æ<c2><92>­è®¯æ<c2><81>¯ç<c2><9a><c2><84>åª<c2><92>ä»<c2><8b>ã<c2><80><c2><82>书ä¹<c2><9f>æ<c2><8c><c2><87>æ<c2><96><c2><87>å­¦ä½<c2><9c>å<c2><93><c2><81>æ<c2><88><c2><96>è<c2><80><c2><85>å<c2><85>¶ä¸­ç<c2><9a><c2><84>ä¸<c2><80>é<c2><83>¨å<c2><88><c2><86>ã<c2><80><c2><82>å<c2><9c>¨å<c2><9b>¾ä¹¦é¦<c2><86>ä¿¡æ<c2><81>¯å­¦ä¸­ï¼<c2><8c>书被称为ä¸<c2><93>è<c2><91><c2><97>ï¼<c2><8c>以å<c2><8c>ºå<c2><88>«äº<c2><8e>æ<c2><9d><c2><82>å¿<c2><97>ã<c2><80><c2><81>å­¦æ<c2><9c>¯æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><81>æ<c2><8a>¥çº¸ç­<c2><89>è¿<c2><9e>è½½æ<c2><9c><c2><9f>å<c2><88><c2><8a>ã<c2><80><c2><82>æ<c2><89><c2><80>æ<c2><9c><c2><89>ç<c2><9a><c2><84>书é<c2><9d>¢ä½<c2><9c>å<c2><93><c2><81>ï¼<c2><88>å<c2><8c><c2><85>æ<c2><8b>¬å<c2><9b>¾ä¹¦ï¼<c2><89>ç<c2><9a><c2><84>主ä½<c2><93>æ<c2><98>¯æ<c2><96><c2><87>å­¦ã<c2><80><c2><82>å<c2><9c>¨å°<c2><8f>说å<c2><92><c2><8c>ä¸<c2><80>äº<c2><9b>ç±»å<c2><9e><c2><8b>ï¼<c2><88>å¦<c2><82>ä¼ è®°ï¼<c2><89>中ï¼<c2><8c>书å<c2><8f>¯è<c2><83>½è¿<c2><98>è¦<c2><81>å<c2><88><c2><86>æ<c2><88><c2><90>å<c2><8d>·ã<c2><80><c2><82>对书ç<c2><89>¹å<c2><88>«å<c2><96><c2><9c>ç<c2><88>±ç<c2><9a><c2><84>人被称为ç<c2><88>±ä¹¦è<c2><80><c2><85>æ<c2><88><c2><96>è<c2><97><c2><8f>书家ï¼<c2><8c>æ<c2><9b>´é<c2><9a><c2><8f>æ<c2><84><c2><8f>ç<c2><9a><c2><84>称å<c2><91>¼æ<c2><98>¯ä¹¦è<c2><99>«æ<c2><88><c2><96>è<c2><80><c2><85>书å<c2><91><c2><86>å­<c2><90>ã<c2><80><c2><82>买书ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹å<c2><8f>«ä¹¦åº<c2><97>ï¼<c2><8c>å<c2><9b>¾ä¹¦é¦<c2><86>å<c2><88><c2><99>æ<c2><98>¯å<c2><8f>¯ä»¥å<c2><80><c2><9f>é<c2><98><c2><85>书ç±<c2><8d>ç<c2><9a><c2><84>å<c2><9c>°æ<c2><96>¹ã<c2><80><c2><82>2010å¹´ï¼<c2><8c>è°·æ­<c2><8c>å<c2><85>¬å<c2><8f>¸ä¼°è®¡ï¼<c2><8c>ä»<c2><8e>å<c2><8d>°å<c2><88>·æ<c2><9c>¯å<c2><8f><c2><91>æ<c2><98><c2><8e>è<c2><87>³ä»<c2><8a>ï¼<c2><8c>大æ¦<c2><82>å<c2><87>ºç<c2><89><c2><88>äº<c2><86>ä¸<c2><80>亿ä¸<c2><89>å<c2><8d><c2><83>ä¸<c2><87>æ<c2><9c>¬ä¸<c2><8d>å<c2><90><c2><8c>书å<c2><90><c2><8d>ç<c2><9a><c2><84>书ç±<c2><8d>ã<c2><80><c2><82>[1]')
     + xpk <- msgpack_pack(x)
     + xu <- msgpack_unpack(xpk)
     + stopifnot(identical(x, xu))
     + }
     >
     > # Complex nested object with lists and map
     > x <- as.raw(c(0x28, 0x4F))
     > attr(x, "EXT") <- 1L
     > xmap <- msgpack_map(key=letters[1:10], value=1:10)
     > xmap$value[[3]] <- list(NULL)
     > xmap$value[[4]] <- as.list(1:10)
     > xmap$value[[4]][[3]] <- xmap
     > xmap$value[[5]] <- x
     > y <- 1:10
     > names(y) <- letters[1:10]
     > x <- list(1:10, y, "a", list(3,raw(4)), xmap)
     > x <- msgpack_format(x)
     > xpk <- msgpack_pack(x)
     > xu <- msgpack_unpack(xpk)
     >
     > xs <- msgpack_simplify(x)
     > xus <- msgpack_simplify(xu)
     >
     > stopifnot(identical(xs, xus))
     >
     > # named list can be used directly as input - should come out to a map, simplify to get a named vector
     > x <- list(a=1L, b=2L)
     > xpk <- msgpack_pack(x)
     > stopifnot(identical(msgpack_simplify(msgpack_unpack(xpk)),c(a=1L, b=2L)))
     >
     > # multiple objects
     > xpk <- msgpack_pack(1,2,3,5,"a", msgpack_format(1:10))
     > xu <- msgpack_unpack(xpk)
     > stopifnot(identical(msgpack_simplify(xu[[6]]), 1:10))
     >
     > # speed test
     > if (requireNamespace("microbenchmark", quietly=TRUE)) {
     + x <- as.list(1:1e6)
     + print(microbenchmark::microbenchmark(xpk <- msgpack_pack(x), times=10)) # 500 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk), times=10)) # 150 ms
     + stopifnot(identical(xu, x))
     +
     + ## vector input
     + x <- 1:1e7
     + print(microbenchmark::microbenchmark(xpk2 <- msgpack_pack(x), times=10)) # 50 ms
     + print(microbenchmark::microbenchmark(xu <- msgpack_unpack(xpk2, simplify=T), times=10)) # 50 ms
     + stopifnot(identical(xu, x))
     + }
     Unit: milliseconds
     expr min lq mean median uq max
     xpk <- msgpack_pack(x) 926.0284 1089.487 1092.35 1096.832 1157.913 1171.614
     neval
     10
     Unit: microseconds
     expr min lq mean median uq max neval
     xu <- msgpack_unpack(xpk) 22.768 23.537 31.2963 23.956 24.654 96.242 10
     Error: identical(xu, x) is not TRUE
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64