package editor import ( "bytes" "fmt" ) // NewDeterministicFile generates a large byte slice using a repeating pattern. // Same parameters always produce identical content. func NewDeterministicFile(seed uint64, blockSize int, repeatCount int) []byte { block := make([]byte, blockSize) for i := 0; i < blockSize; i++ { // Simple deterministic pattern based on seed and index block[i] = byte((seed + uint64(i)) % 256) } return bytes.Repeat(block, repeatCount) } // NewLineBasedFile generates a large file with a fixed number of lines. // Each line is predictably formatted: "Line : \n". func NewLineBasedFile(seed uint64, lineCount int) []byte { var buf bytes.Buffer for i := 0; i < lineCount; i++ { line := fmt.Sprintf("Line %d: seed=%d, data=some-deterministic-filler-text-here\n", i, seed) buf.WriteString(line) } return buf.Bytes() }