Rcompression To Do list

  • [Done] names on the zip archive (@elements) becoming numbers when duplicates. Are we taking the rownames when we have the actual names!
      content = I(c(myFile = "This is raw text",
                      otherFile = paste(letters, collapse = "\n"),
                      x = "a", x = "b", x = "c"))
    
      zip("asis.zip", content, append = FALSE)
      z = zipArchive("asis.zip")      
    
  • When rewriting a zip file, want to preserve times. So need to be able to specify these as a vector to zip().
  • For RdzArchive files, should .toc not count when indexing by integer.
    i.e. x[[1]] gives the second element since .toc is first.
  • [Done] Get the last element named 'whatever'. Do this for [[ and $ operators on ZipArchive.
    Done for [[ in RdzArchive.
    [Done] Move to ZipArchive.
  • Add ability to remove an entry.
    Load them all up, remove one or more, then zip them back. For Rdz files need to avoid deserializing first.
  • Getting problems about NULL value passed to R_getNativeReference.
    Is this just with remove entries - zipRemoveEntries?
  • When update a RdzArchive, the .toc is out of date in the file.
    Not much we can do about this unless we add a new one.
    When create the object in zipArchive() we can cache the Sys.time() and compare that to the file.info()[1, "mtime"] to see if the file has been modified since the elements were cached.
  • [Done] When we have several elements with the same name in an archive, allow accessing the last one?
    ar[["x", last = TRUE]] # default ar[["x", last = FALSE]]
  • Global comment.
    Use zipOpen2 in minizip rather than zipOpen().
  • [Done] When we update a ZipArchive, the info slot is out of date
    We can add a row to the date frame when we append.
    [Done] Updated now, but fix the row names (now .toc, .toc1, .toc2)
  • [Done] getZipInfo( comment = TRUE) causing problems
    Returning garbage. Initialization problem in C.
  • [Done] setting rownames on the getZipInfo() can cause problems because of duplicate names.
    library(Rcompression)
    x = I(c(a = "ABC", b = "DEF", c = "GHIJKLML"))
    zip("foo.zip", x, append = FALSE)
    zip("foo.zip", x)
    z = zipArchive("foo.zip")
    getZipInfo(z)      
    
  • [Done] Allow comments on the zip elements. And also for the entire zip file, i.e. a global comment.
    Done for the elements, but how do we see them? getZipInfo() now optionally returns them.
    But they are truncated.
    Seems okay now. See tests/comments.R
  • Reading a file from a zip file seems to take a long time. Are we reading the whole file each time?
  • [Done] Encoding issues in tests/zip.R
    Don't think so. Just have to supply the password. (Was that the problem?)
  • Add the deflate functions for gzip and bzip2.
    gzip done. But we cannot gunzip() the result.
    Still true?
    gunzip(gzip("This is a string"))      
    
    No bzip2 facilities.
  • Allow the user to provide a connection on which to provide the compressed input so that the routines pull the data from that rather than having it in a buffer ahead of time.
    Hookup to the RCurl write_binary_data routine to have inflation be done on the fly.
  • [Done] If given I(c("A", "B")), preserve the I across the elements when making a list.
    In the tests now.
  • [Done] On Windows, can we have, e.g., c:/ in the name of a directory. What about \
    Yes, but the regular unzip replaces c:/ with c_/, i.e. we get a top-level directory named c_
  • [Done] Check directories on Windows
    content = list( "A/myFile" = I("This is raw text"), "B/otherFile" = I(paste(letters, collapse = "\n")), top = I("A string"))
    zip("/tmp/dir.zip", content)      
    
    Then unzip externally to see if the zip facilities do the right thing.
  • [Done] Check directories for zip, i.e. when we use hierarchical names
  • [Done] Put the current date for in-memory elements in call to zip().
  • [Done for []. ]Make the x[] and x[c(a, b, c)] read sequentially rather than starting over each time.
    Could find a, b, c and figure out the order.

  • Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: Fri Feb 12 07:14:35 PST 2010