<commit_before>package lzbase

import "io"

type Writer struct {
	State *WriterState
	re    *rangeEncoder
	dict  *WriterDict
	eos   bool
}

func NewWriter(w io.Writer, state *WriterState, eos bool) (*Writer, error) {
	if w == nil {
		return nil, newError("NewWriter argument w is nil")
	}
	if state == nil {
		return nil, newError("NewWriter argument state is nil")
	}<commit_msg>lzbase: added missing documentation in writer.go<commit_after>package lzbase

import "io"

// Writer supports the creation of an LZMA stream.
type Writer struct {
	State *WriterState
	re    *rangeEncoder
	dict  *WriterDict
	eos   bool
}

// NewWriter creates a writer using the state. The argument eos defines whether
// an explicit end-of-stream marker will be written.
func NewWriter(w io.Writer, state *WriterState, eos bool) (*Writer, error) {
	if w == nil {
		return nil, newError("NewWriter argument w is nil")
	}
	if state == nil {
		return nil, newError("NewWriter argument state is nil")
	}
{'fraction_non_alphanumeric': 0.09295199182839632, 'fraction_numerical': 0.0, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5956484', 'n_tokens_mistral': 315, 'n_tokens_neox': 309, 'n_words': 120}