归档与再使用
原能力
记录可复用素材和适用限制,向后续制作或传播交接可用版本。(细化版 p.12–13)
首选项目
Git LFS(MIT(部分 Go 代码 BSD-3-Clause))。 Git LFS
匹配范围
大文件版本化与资源目录管理可复用素材。
源码
Git LFS · func DecodePointer(
lfs/pointer.go · 118–131 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
func DecodePointer(reader io.Reader) (*Pointer, error) {
p, _, err := DecodeFrom(reader)
return p, err
}
// DecodeFrom decodes an *lfs.Pointer from the given io.Reader, "reader".
// If the pointer encoded in the reader could successfully be read and decoded,
// it will be returned with a nil error.
//
// If the pointer could not be decoded, an io.Reader containing the entire
// blob's data will be returned, along with a parse error.
func DecodeFrom(reader io.Reader) (*Pointer, io.Reader, error) {
buf := make([]byte, BlobSizeCutoff)
n, err := reader.Read(buf)
实现与验收要点
再使用的用途限制、交接批准及长期保留。