Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 23 for bytebit (0.04 seconds)

  1. docs/de/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### Eine Datei simulieren { #simulate-a-file }
    
    In diesem Beispiel simulieren wir eine Datei mit `io.BytesIO`, einem dateiähnlichen Objekt, das nur im Speicher lebt, uns aber dieselbe Schnittstelle nutzen lässt.
    
    Wir können z. B. darüber iterieren, um seinen Inhalt zu konsumieren, so wie bei einer Datei.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:48:21 GMT 2026
    - 6K bytes
    - Click Count (0)
  2. docs/pt/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### Simular um arquivo { #simulate-a-file }
    
    Neste exemplo, estamos simulando um arquivo com `io.BytesIO`, que é um objeto semelhante a arquivo que vive somente na memória, mas nos permite usar a mesma interface.
    
    Por exemplo, podemos iterar sobre ele para consumir seu conteúdo, como faríamos com um arquivo.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:13 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### Simulate a File { #simulate-a-file }
    
    In this example, we are simulating a file with `io.BytesIO`, which is a file-like object that lives only in memory, but lets us use the same interface.
    
    For example, we can iterate over it to consume its contents, as we could with a file.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  4. docs/ko/docs/advanced/stream-data.md

    ### 파일 시뮬레이션 { #simulate-a-file }
    
    이 예시에서는 `io.BytesIO`로 파일을 시뮬레이션합니다. 이는 메모리에서만 존재하지만 파일과 동일한 인터페이스를 제공하는 파일 유사 객체입니다.
    
    예를 들어 실제 파일처럼 내용을 소비하기 위해 순회(iterate)할 수 있습니다.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *}
    
    /// note | 기술 세부사항
    
    다른 두 변수 `image_base64`와 `binary_image`는 이미지를 Base64로 인코딩한 뒤 바이트로 변환한 것이며, 이를 `io.BytesIO`에 전달합니다.
    
    이 예시에서 하나의 파일 안에 모두 담아, 그대로 복사해 실행할 수 있도록 하기 위한 목적입니다. 🥚
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:56:39 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  5. docs/fr/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### Simuler un fichier { #simulate-a-file }
    
    Dans cet exemple, nous simulons un fichier avec `io.BytesIO`, qui est un objet de type fichier résidant uniquement en mémoire, mais qui permet d'utiliser la même interface.
    
    Par exemple, nous pouvons itérer dessus pour en consommer le contenu, comme nous le ferions avec un fichier.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:33:45 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  6. docs/zh/docs/advanced/stream-data.md

    ### 模拟文件 { #simulate-a-file }
    
    在这个示例中,我们用 `io.BytesIO` 模拟了一个文件,它是只驻留在内存中的类文件对象,但提供相同的接口。
    
    例如,我们可以像对文件那样迭代它来消费其内容。
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *}
    
    /// note | 技术细节
    
    另外两个变量 `image_base64` 和 `binary_image` 表示一张图像,先用 Base64 编码,再转换为 bytes,最后传给 `io.BytesIO`。
    
    只是为了让它们能和示例放在同一个文件里,便于你直接复制运行。🥚
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:29:48 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Huffman.kt

          sink.writeByte(accumulator.toInt())
        }
      }
    
      fun encodedLength(bytes: ByteString): Int {
        var bitCount = 0L
    
        for (i in 0 until bytes.size) {
          val byteIn = bytes[i] and 0xff
          bitCount += CODE_BIT_COUNTS[byteIn].toLong()
        }
    
        return ((bitCount + 7) shr 3).toInt() // Round up to an even byte.
      }
    
      fun decode(
        source: BufferedSource,
        byteCount: Long,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 11K bytes
    - Click Count (0)
  8. docs/ja/docs/advanced/stream-data.md

    ### ファイルを模擬する { #simulate-a-file }
    
    この例では `io.BytesIO` でファイルを模擬しています。これはメモリ上だけに存在するファイルライクオブジェクトですが、通常のファイルと同じインターフェースを提供します。
    
    例えば、ファイルと同様にイテレートして内容を読み出せます。
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *}
    
    /// note | 技術詳細
    
    他の2つの変数 `image_base64` と `binary_image` は、画像を Base64 でエンコードし、それを `bytes` に変換してから `io.BytesIO` に渡したものです。
    
    この例では1つのファイル内に完結させ、コピーしてそのまま実行できるようにするためだけのものです。 🥚
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:55:22 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  9. tests/test_datastructures.py

        assert testing_file_store
        assert testing_file_store[0].file.closed
    
    
    # For UploadFile coverage, segments copied from Starlette tests
    
    
    @pytest.mark.anyio
    async def test_upload_file():
        stream = io.BytesIO(b"data")
        file = UploadFile(filename="file", file=stream, size=4)
        assert await file.read() == b"data"
        assert file.size == 4
        await file.write(b" and more data!")
        assert await file.read() == b""
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  10. src/bufio/bufio_test.go

    		t.Error("expected error at EOF")
    	} else if err != io.EOF {
    		t.Error("expected EOF; got", err)
    	}
    }
    
    func TestReadWriteRune(t *testing.T) {
    	const NRune = 1000
    	byteBuf := new(bytes.Buffer)
    	w := NewWriter(byteBuf)
    	// Write the runes out using WriteRune
    	buf := make([]byte, utf8.UTFMax)
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(buf, r)
    		nbytes, err := w.WriteRune(r)
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Fri Feb 07 01:08:54 GMT 2025
    - 51.6K bytes
    - Click Count (0)
Back to Top