diff --git a/part.go b/part.go index c22740c..d58bf9c 100644 --- a/part.go +++ b/part.go @@ -7,22 +7,6 @@ import ( "strings" ) -// CompressionOption is an enumerable for the different compression options. -type CompressionOption int - -const ( - // CompressionNone disables the compression. - CompressionNone CompressionOption = iota - 1 - // CompressionNormal is optimized for a reasonable compromise between size and performance. - CompressionNormal - // CompressionMaximum is optimized for size. - CompressionMaximum - // CompressionFast is optimized for performance. - CompressionFast - // CompressionSuperFast is optimized for super performance. - CompressionSuperFast -) - // A Part is a stream of bytes defined in ISO/IEC 29500-2 ยง9.1.. // Parts are analogous to a file in a file system or to a resource on an HTTP server. // The part properties will be validated before writing or reading from disk. diff --git a/relationship.go b/relationship.go index 8dfdaf5..dd7855b 100644 --- a/relationship.go +++ b/relationship.go @@ -24,19 +24,6 @@ const ( const externalMode = "External" -const ( - // RelTypeMetaDataCoreProps defines a core properties relationship. - RelTypeMetaDataCoreProps = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" - // RelTypeDigitalSignature defines a digital signature relationship. - RelTypeDigitalSignature = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature" - // RelTypeDigitalSignatureOrigin defines a digital signature origin relationship. - RelTypeDigitalSignatureOrigin = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin" - // RelTypeDigitalSignatureCert defines a digital signature certificate relationship. - RelTypeDigitalSignatureCert = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/certificate" - // RelTypeThumbnail defines a thumbnail relationship. - RelTypeThumbnail = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail" -) - // Relationship is used to express a relationship between a source and a target part. // The only way to create a Relationship, is to call the Part.CreateRelationship() // or Package.CreateRelationship(). A relationship is owned by a part or by the package itself. diff --git a/writer.go b/writer.go index 6d3cd00..a2a6f20 100644 --- a/writer.go +++ b/writer.go @@ -11,6 +11,22 @@ import ( const opcCtx = "opc" +// CompressionOption is an enumerable for the different compression options. +type CompressionOption int + +const ( + // CompressionNone disables the compression. + CompressionNone CompressionOption = iota - 1 + // CompressionNormal is optimized for a reasonable compromise between size and performance. + CompressionNormal + // CompressionMaximum is optimized for size. + CompressionMaximum + // CompressionFast is optimized for performance. + CompressionFast + // CompressionSuperFast is optimized for super performance. + CompressionSuperFast +) + // Writer implements a OPC file writer. type Writer struct { p *Package @@ -26,7 +42,7 @@ func NewWriter(w io.Writer) *Writer { // Flush flushes any buffered data to the underlying writer. // Part metadata, relationships, content types and other OPC related files won't be flushed. // Calling Flush is not normally necessary; calling Close is sufficient. -// Useful to do simultaneos writing and reading. +// Useful to do simultaneous writing and reading. func (w *Writer) Flush() error { return w.w.Flush() }