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:
1 parent
dff173efe5
commit
e1460042c2
6 files changed
+168
-116
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user