exo-notes/content/posts/20220223.md

631 B

Title: 20220223 Slug: 20220223 Date: 2022-02-23 22:22 PST Modified: 2022-02-23 22:25 PST Category: Tags: journal Authors: kyle Summary: Design work on blobs.

I finished writing out the basic blob database and structure types. The blob was a structure like

type Blob struct {
	ID          string
	Header      *Header
	ContentType string
	Contents    []byte
}

I decided to make it an io.Reader to make it better handle large files; rather than load them entirely into memory, we can do a straight buffer.

type Blob struct {
	ID          string
	Header      *Header
	ContentType string
	r           io.Reader
}