janalysis/jpeg.py
def _huffman_encode(run_length):
    """Replace the symbols with their appropriate huffman code."""
    for index, tup in enumerate(run_length):
        # Just using the luminance tables for simplicity
        if index == 0:
            tup = run_length[index]
            run_length[index] = (JPEG_HUFFMAN_DC_LUM[tup[0]], tup[1])
        else:
            tup = run_length[index]
            run_length[index] = (JPEG_HUFFMAN_AC_LUM[tup[0]], tup[1])
Replace the symbols with their appropriate huffman code.
Replace the symbols with their appropriate huffman code.
Replace the symbols with their appropriate huffman code .
def _huffman_encode(run_length):
    for index, tup in enumerate(run_length):
        if index == 0:
            tup = run_length[index]
            run_length[index] = (JPEG_HUFFMAN_DC_LUM[tup[0]], tup[1])
        else:
            tup = run_length[index]
            run_length[index] = (JPEG_HUFFMAN_AC_LUM[tup[0]], tup[1])
def _huffman_encode ( run_length ) : for index , tup in enumerate ( run_length ) : if index == 0 : tup = run_length [ index ] run_length [ index ] = ( JPEG_HUFFMAN_DC_LUM [ tup [ 0 ] ] , tup [ 1 ] ) else : tup = run_length [ index ] run_length [ index ] = ( JPEG_HUFFMAN_AC_LUM [ tup [ 0 ] ] , tup [ 1 ] )
Replace the symbols with their appropriate huffman code.
Replace the symbols with their appropriate huffman code .
"""Replace the symbols with their appropriate huffman code.""" # Just using the luminance tables for simplicity
run_length