zipper

package module
v0.0.0-...-6265422 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

Zipper

Golang Lib to create a Zip Archive of a file or folder. That will be compatible with Java's ZipInputStream

See: http://webmail.dev411.com/p/gg/golang-nuts/155g3s6g53/go-nuts-re-zip-files-created-with-archive-zip-arent-recognised-as-zip-files-by-java-util-zip

Usage

import (
       "log"

       "github.com/30x/zipper"
)

func main() {
  err := zipper.Archive("~/Source/dir/", "./output.zip")
  if err != nil {
     log.Fatal(err)
  }
}

Documentation

Index

Constants

View Source
const CentralDirectoryFileHeaderLen = 46
View Source
const EOCDLen = 22

Variables

This section is empty.

Functions

func Archive

func Archive(source, target string, options Options) error

Archive processes the file headers after zipping

func ArchiveUnprocessed

func ArchiveUnprocessed(source, target string, options Options) error

ArchiveUnprocessed does not process the file headers after zipping.

func MyProcess

func MyProcess(source string, target string) error

Types

type Options

type Options struct {
	ExcludeBaseDir bool
}

type ZipDirEntry

type ZipDirEntry struct {
	// contains filtered or unexported fields
}

type ZipEndLocator

type ZipEndLocator struct {
	// contains filtered or unexported fields
}

type ZipFileHeader

type ZipFileHeader struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL