opc alternatives and similar packages
Based on the "Files" category.
Alternatively, view opc alternatives based on common mentions on social networks and blogs.
-
vfs
A pluggable, extensible, and opinionated set of filesystem functionality for Go across a number of filesystem types such as os, S3, and GCS. -
go-exiftool
Go bindings for ExifTool, the well-known library used to extract as much metadata as possible (EXIF, IPTC, ...) from files (pictures, PDF, office, ...). -
gut/yos
Simple and reliable package for file operations like copy/move/diff/list on files, directories and symbolic links. -
fileconversion
A Go library to convert various file formats to plaintext and provide related functions -
go-staticfiles
Collects assets (css, js, images...) from a different locations, tags file names with a hash for easy versioning and aggressive caching.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of opc or a related project?
Popular Comparisons
README
opc
Package opc implements the ISO/IEC 29500-2, also known as the Open Packaging Convention.
The Open Packaging specification describes an abstract model and physical format conventions for the use of XML, Unicode, ZIP, and other openly available technologies and specifications to organize the content and resources of a document within a package.
The OPC is the foundation technology for many new file formats: .docx, .pptx, .xlsx, .3mf, .dwfx, ...
Features
- [x] Package reader and writer
- [x] Package core properties and relationships
- [x] Part relationships
- [x] ZIP mapping
- [x] Package, relationships and parts validation against specs
- [ ] Part interleaved pieces
- [ ] Digital signatures
Examples
Write
// Create a file to write our archive to.
f, _ := os.Create("example.xlsx")
// Create a new OPC archive.
w := opc.NewWriter(f)
// Create a new OPC part.
name := opc.NormalizePartName("docs\\readme.txt")
part, _ := w.Create(name, "text/plain")
// Write content to the part.
part.Write([]byte("This archive contains some text files."))
// Make sure to check the error on Close.
w.Close()
Read
r, _ := opc.OpenReader("testdata/test.xlsx")
defer r.Close()
// Iterate through the files in the archive,
// printing some of their contents.
for _, f := range r.Files {
fmt.Printf("Contents of %s with type %s :\n", f.Name, f.ContentType)
rc, _ := f.Open()
io.CopyN(os.Stdout, rc, 68)
rc.Close()
fmt.Println()
}
*Note that all licence references and agreements mentioned in the opc README section above
are relevant to that project's source code only.