Clean up the API and writer code.

Added an Example in documentation for code usage.
Cleaned up documentation and README.txt.
This commit is contained in:
alexmullins committed 2015-12-03 04:44:20 -06:00
1 parent dff173efe5
commit e1460042c2
6 files changed
+168 -116

No files matched your search

+1 -3
View File
@@ -228,10 +228,8 @@ func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) {
}
// check for password
var sw io.Writer = fw.compCount
if fh.Password != nil {
if fh.password != nil {
// we have a password and need to encrypt.
// 1. Set encryption bit in fh.Flags
fh.setEncryptionBit()
fh.writeWinZipExtra()
fh.Method = 99 // ok to change, we've gotten the comp and wrote extra
ew, err := newEncryptionWriter(sw, fh, fw)