[Solved]: Why is compression ratio using bzip2 for a sequence of “a”s so jumpy?

Problem Detail:  library(ggplot2) compress <- function(str) { length(memCompress(paste(rep(“a”, str), collapse=””), type=”bzip2″)) / nchar(paste(rep(“a”, str), collapse=””)) } cr <- data.frame(i = 1:10000, r = sapply(1:10000, compress)) ggplot(cr[cr$i>=5000 & cr$i<=10000,], aes(x=i, y=r)) + geom_line() The compression ratio starts out at 37 for Read More …