referring to fig3 an embodiment of the present invention with respect to a coding circuit will be described . the coding circuit , employing the mr coding algorithm , shown in fig3 comprises a direct memory access controller ( dmac ) 20 , a line buffer control circuit 21 , a line buffer 22 , a reference line fifo circuit 23 , a coded line fifo circuit 24 , an mr coding circuit 25 and a preparation circuit 26 . the feature of the present invention is in the preparation circuit 26 , which has a compression circuit 27 and an expansion circuit 28 . by adding the preparation circuit 26 , the dmac 20 and the line buffer control circuit 21 are slightly modified as described . hereinafter . however , the reference line fifo circuit 23 , the coded line fifo circuit 24 and the mr coding circuit 25 may be the same as those in fig2 . with respect to the line buffer 22 , its capacity can be remarkably reduced . as shown in fig3 the dmac 20 is coupled to the system bus 9 for access to the main memory 5 in fig1 and is coupled in common to the reference line fifo circuit 23 , the coded line fifo circuit 24 , and the preparation circuit 26 . when the compression circuit 27 receives a line to be coded ( which line is also entered into the coded line fifo circuit 24 ), it compresses the line into a short code ( hereinafter called &# 34 ; compression code &# 34 ;) lx . the compression code lx is written into the line buffer 22 via the line buffer control circuit 21 . a compression code stored in the line buffer 22 is read out and sent to the expansion circuit 28 as a reference code lw by the line buffer control circuit 21 . the expansion circuit 28 expands the reference code lw to reproduce the original uncompressed line by using the dmac 20 . the reproduced line is entered as a reference line into the reference line fifo circuit 23 when a successive line is entered into the coded line fifo circuit 24 . the two adjacent lines in circuits 23 and 24 are applied to the mr coding circuit 25 . using the mr coding algorithm , the mr coding circuit 25 produces a coded signal of the line in the coded line fifo circuit 24 with reference to the reference line in the reference line fifo circuit 23 . the dmac can access the image memory area 10 of the main memory 5 word by word . when one word is comprised of sixteen bits ( dots ), the dmac 20 simultaneously reads sixteen bits out of the image memory area 10 and enters them into both the compression circuit 27 and the coded line fifo circuit 24 at the same time . the compression circuit 27 compresses the read out sixteen bits into just one bit ( compression code ). that is , if the sixteen bits represent a string of all white picture elements , &# 34 ; 0 &# 34 ; is generated as the compression code . on the other hand , if the string is sixteen bits includes at least one black picture element , &# 34 ; 1 &# 34 ; is generated as the compression code . thus , the compression circuit 27 compresses sixteen bits into one bit . the compressed code is written into the line buffer 22 . consequently , the capacity of the line buffer 22 can be reduced to one - sixteenth of the line buffer in prior systems . in the case of using sixteen scanning signals per 1 mm , for an image of a4 size paper ( 3456 bits / line ) the memory capacity required by the line buffer 22 is only 216 bits . as a result , the line buffer 22 can be integrated on a single semiconductor chip 200 together with the dmac 20 , the preparation circuit 26 , and fifo circuits 23 and 24 . an example of the compression circuit 27 is illustrated in fig4 . the illustrated compression circuit comprises an or gate 30 having its sixteen input ends coupled to the dmac 20 to receive sixteen bits d 0 - d 15 in parallel , and a flip - flop 31 having its set input coupled to an output of the or gate 30 . it is assumed that a white picture element is represented by &# 34 ; 0 &# 34 ; and that a black picture element is represented by &# 34 ; 1 &# 34 ;. when the sixteen bits of d 0 - d 15 are all white picture elements , the output of the or gate 30 becomes &# 34 ; 0 &# 34 ;. the flip - flop 31 is also set to &# 34 ; 0 &# 34 ; and outputs a &# 34 ; 0 &# 34 ; signal as the compression code lx . on the other hand , when at least one black picture element is involved within the sixteen bits d 0 - d 15 , the output of the or gate 30 becomes &# 34 ; 1 &# 34 ;, and therefore the flip - flop 31 is set to &# 34 ; 1 &# 34 ;. at this time , a &# 34 ; 1 &# 34 ; signal is output as the compression code lx . thus , sixteen bits can be compressed into a 1 - bit code of &# 34 ; 0 &# 34 ; or &# 34 ; 1 &# 34 ;. the compression code is written into the line buffer 22 via the line buffer control circuit 21 . the code written into the line buffer 22 must be used as the reference line when a subsequent line is coded . however , because the reference line is written into the line buffer 22 in the form of compression code , the reference code lw read out of the line buffer 22 cannot be directly entered into the reference line fifo circuit 23 as is . therefore , the expansion circuit 28 is provided to expand and restore the compression code into the original sixteen - bit signals existing before compression . fig5 illustrates a circuit diagram of an example of the expansion circuit 28 . the expansion circuit has a white picture element signal generator 28a . in this embodiment , sixteen - bit white signals (&# 34 ; 0 &# 34 ; signals ) are generated according to the compressed reference code lw read out of the line buffer 22 . as shown in fig5 sixteen buffers b 0 - b 15 are arranged in parallel . an input end of each buffer is connected to ground ( gnd ) in common . the compression code lw read out of the line buffer 22 is applied in common to each of the sixteen buffers b 0 - b 15 . when the compression code lw is &# 34 ; 0 &# 34 ; ( low level signal ), the buffers b 0 - b 15 are activated simultaneously , generating sixteen &# 34 ; 0 &# 34 ; signals d 0 - d 15 at the same time . these &# 34 ; 0 &# 34 ; signals , representing sixteen bits of white picture elements , are transferred to the reference line fifo circuit 23 . that is , when the code lw is &# 34 ; 0 &# 34 ;, the sixteen bits entered by expansion circuit 28 into the reference line fifo circuit 23 are all white (&# 34 ; 0 &# 34 ;) signals . on the other hand , when the compressed code lw is &# 34 ; 1 &# 34 ;, all the buffers b 0 - b 15 are inactivated , making all of their outputs d 0 - d 15 a high impedance to enable other information including at least one black picture element to be entered in the reference line fifo circuit 23 . the expansion circuit 28 has a control circuit 28b comprising or gates 34 and 36 , and and gate 33 , an inverter 35 and a t type ( bistable ) flip - flop 32 . as inputs , the control circuit receives timing signals s3 and s4 and the compression code lw read out of the line buffer 22 . it produces a ( memory read ) request signal req to dmac 20 when the code lw is &# 34 ; 1 &# 34 ;. the request signal req is applied to the dmac 20 to indicate that the previous line which has been already coded by coding circuit 25 is required as the reference line for circuit 23 . the dmac 20 reads the previous line stored in the image memory area 10 out of the main memory 5 by means of dma transfer , only when the code lw is &# 34 ; 1 &# 34 ;. in such case , the previous line including at least one black picture element is entered into the reference line fifo circuit 23 . the req signal is generated either when a csel signal from flip - flop 32 is ∂ 1 &# 34 ;, or when both a csel signal ( the logical inverse of the csel signal ) and the code lw are &# 34 ; 1 &# 34 ;. the csel signal is an output signal of the flip - flop 32 , whose state is reversed whenever either of the timing signals s3 or s4 becomes a &# 34 ; 1 &# 34 ;. an internal block diagram of the dmac 20 is illustrated in fig6 . the dmac 20 comprises a dma address generating circuit 20a having a reference line address register 50 , a coded line address register 51 , a multiplexer 52 , an adder 53 , and an address buffer 54 ; a control circuit 20b having a reference line end address register 55 , a coded line end address register 56 , a multiplexer 57 and a comparator 58 ; a data transmission circuit 20c having a data buffer 59 ; and a timing control circuit 20d having a timing control circuit 60 . the dmac 20 has to be able to read out of the image memory area 10 both the line to be coded and the line to be used as the reference line . the dma address generating circuit 20a can generate either the coded line address or the reference line address . that is , when the csel input signal is &# 34 ; 1 &# 34 ;, the coded line address is applied via the mpx 52 from the register 51 to the adder 53 and a &# 34 ; 1 &# 34 ; is added to it . this incremented coded line address is sent through the system bus 9 to the main memory 5 via the address buffer 54 to read the line to be coded out of the image memory area 10 . it is also fed back to the register 51 to increment the register &# 39 ; s contents . when the csel signal is &# 34 ; 0 &# 34 ;, the reference address is instead applied via the mpx 52 from the reference address register 50 to the adder 53 and a &# 34 ; 1 &# 34 ; is added to it . this incremented reference line address is then fed back to the register 50 to increment its contents . only when the lw signal is &# 34 ; 1 &# 34 ; is this incremented reference line address also sent through the system but 9 to the main memory 5 to read the reference line out of the image memory area 10 . the reference line read out of the main memory 5 is transferred through the system bus 9 to the data buffer 59 , which is activated when the req signal is &# 34 ; 1 &# 34 ;. when the data buffer 59 is activated , the line to be coded which has been read out of the main memory 5 is entered into the coded line fifo circuit 24 and the compression circuit 27 , and the line to be used as the reference line is entered into the reference line fifo circuit 23 . the reference line end address and the coded line end address are set by the host processor 1 in respective registers 55 and 56 and can be compared by comparator 58 with the output of the adder . when the csel signal is &# 34 ; 1 &# 34 ;, the coded line end address is compared with the incremented coded line address . when the csel signal is &# 34 ; 0 &# 34 ;, the reference line end address is compared with the incremented reference line address . when a coincidence signal is generated from the comparator 58 , the coincidence signal is sent to the host processor 1 as a dma end signal through the system bus 9 . the dma transfer is controlled by timing signals s1 to s4 generated by the timing control circuit 60 in response to the csel signal , and lw signal ( the logical inverse of the reference code lw ) and the req signal . an internal block diagram of the timing control circuit 60 is shown in fig7 . the timing control circuit 60 has four delay type flip - flops ( dff ) 61 to 64 which are linked together in that order and which receive a common clock signal ck . each delay type flip - flop has an input i and an output o . an output of an or gate 68 is applied to the input i of the dff 61 . the signal at output o of the dff 61 is the s1 signal , which is applied to the input i of the dff 62 , whose output i is the s2 signal . the s2 signal is applied to an input i of the dff 63 . the output i of the dff 63 is the s3 signal , which is applied to and gates 66 and 67 . the and gate 66 also receives the output of an and gate 65 . the output of and gate 65 is &# 34 ; 1 &# 34 ; when the csel and lw signals are both &# 34 ; 1 &# 34 ;. the output of and gate 67 becomes &# 34 ; 1 &# 34 ; when the s3 signal and the req signal are both &# 34 ; 1 &# 34 ;. the last dff 64 receives the output of the and gate 66 at its input i and generates the s4 signal at its output o . the s4 signal and the output of the and gate 67 are fed back to the input i of the dff 61 via the or gate 68 . the timing control circuit 60 shown in fig7 is arranged so that the s1 signal is activated (&# 34 ; 1 &# 34 ;) when the circuit 60 is initialized by a reset signal . thereafter , the s2 signal follows the s1 signal by a delay of one clock pulse in response to the clock ck , and the s3 signal follows one clock pulse behind s2 . the period between s1 and s3 is assigned to perform a dma transfer . that is , either a line to be coded or a line used as a reference line is read out of the main memory 5 word by word . therefore , the address buffer 54 of fig6 is activated by either the s1 , s2 or s3 signal input to or gate 61 . when a dma transfer is required , the s1 to s3 signals are sequentially generated . after the line to be coded is transferred from the main memory 5 to the coded line fifo circuit 24 and the compression circuit 27 , the s4 signal is generated if the compression code lw read out of the line buffer 22 is &# 34 ; 0 &# 34 ;. that is , when the compression code is &# 34 ; 0 &# 34 ;, the expansion circuit 28 produces sixteen bits of all white signal , so that the dma transfer of the reference line is not required . in this case , the csel signal and the lw signal become both &# 34 ; 1 &# 34 ;. thus the and gate 66 in fig7 generates a &# 34 ; 1 &# 34 ; signal . in response to the output of the and gate 66 , and at the next clock ck the dff 64 produces the s4 signal . it should be noted that the expansion circuit 28 can generate the sixteen bits of white signals within the short period determined by only the s4 signal because a dma transfer from memory is unnecessary . on the other hand , when the compression code lw read out of the line buffer 22 is &# 34 ; 1 &# 34 ;, the expansion circuit 28 cannot produce the word of the reference line . therefore , the req signal is generated to request a dma transfer from the dmac 20 . at this time , since the and gate 67 in fig7 becomes &# 34 ; 1 &# 34 ;, the s1 signal is next generated after the s3 signal has been generated . the s4 signal is not generated at this time after the s3 signal . fig8 illustrates internal block diagrams of the line buffer control circuit 21 and the line buffer 22 in fig3 . the line buffer control circuit 21 has a write address generation circuit 44 and a read address generation circuit 45 . the line buffer 22 has two line buffer memories , a and b ( 46 , 47 ). the compression code lx applied from the compression circuit 27 is written into the line buffer memory a via a multiplexer 40 according to a write address applied to the line buffer memory a via a multiplexer 41 . at this time , the compression code already stored in the line buffer memory b is read out via a multiplexer 42 as the reference code lw according to a read address applied to the line buffer memory b via a multiplexer 43 . this working is reversed when a compression code is written to the memory b while a reference code is read from memory a . multiplexers 40 to 43 are suitably controlled by a switching control circuit 48 . the capacity of each line buffer memory 46 , 47 need only be 216 bits . fig9 shows compression of a line and its restoration by expansion of the corresponding compression codes . in fig9 the 1st block to the 7th block of a line is illustrated as words w1 - w7 . each word ( block ) consists of sixteen bits . as shown in fig9 words w1 , w2 , w3 , and w6 are all white picture elements , while words w4 , w5 , and w7 include at least one black picture element . turning to fig3 when word w1 is read out of the main memory 5 , it is applied to both the coded line fifo circuit 24 and the compression circuit 27 . since this word w1 has all white picture elements , the compression circuit 27 produces a compression code &# 34 ; 0 &# 34 ;. subsequently , the words w2 and w3 are also each compressed into the compression code &# 34 ; 0 &# 34 ;. words w4 and w5 are each respectively compressed into &# 34 ; 1 &# 34 ;. the words w6 and w7 are respectively compressed into &# 34 ; 0 &# 34 ; and &# 34 ; 1 &# 34 ;. thus , the 112 bits of the line are compressed into 7 bits . when a successive line is coded , the compression codes are read out of the line buffer 22 and are used to prepare a reference line . as described above , since the words w1 , w2 , w3 and w6 are each compressed into a &# 34 ; 0 &# 34 ;, the expansion circuit 28 alone can produce white picture element signals . in this case , the all &# 34 ; 0 &# 34 ; words w1 &# 39 ;, w2 &# 39 ;, w3 &# 39 ;, and w6 &# 39 ; are produced by the white element generator 28a ( fig5 ) in the expansion circuit 28 and are entered into the reference line fifo circuit 23 . these operations are executed according to a mode a whose timing is shown in fig1 . that is , the compression code lw is read out of the line buffer 22 is response to the s1 signal and the line to be coded is read out of the main memory 5 in response to the signals s1 to s3 . because the reference code is &# 34 ; 0 &# 34 ;, the s4 signal is generated , causing the expansion circuit 28 to produce white picture element signals w1 &# 39 ;, w2 &# 39 ;, w3 &# 39 ;, and w6 &# 39 ; and to enter them into the reference line fifo circuit 23 . turning to fig9 the compression codes lw of the words w4 , w5 and w7 are &# 34 ; 1 &# 34 ;, and therefore the reference line is produced by a mode b as shown in fig1 . according to this mode b , the compression code &# 34 ; 1 &# 34 ; is read out of the line buffer 22 in response to the s1 signal and the next word of the line to be coded is read out of the main memory 5 in response to signals s1 to s3 . since the compression code is &# 34 ; 1 &# 34 ;, the timing control circuit 60 does not generate the s4 signal after the s3 signal . instead , the signals s1 to s3 are generated to enable the dma transfer . then , the dmac 20 reads the reference line information corresponding to the words w4 , w5 and w7 out of the main memory 5 and enters them into the reference line fifo circuit 23 . according to the present embodiment , the necessary capacity of the line buffer can be remarkably reduced . therefore , the line buffer 22 can be integrated on a single semiconductor chip 200 together with the dmac 20 , the mr coding circuit 25 , the fifo circuits 23 , 24 and the preparation circuit 26 . further , since the number of black picture elements is typically smaller than that of the white picture elements , mr coding can be performed at a high speed . in fig4 the compression circuit 27 compresses one block consisting of sixteen bits into one bit . however , in the case where a plurality of sixteen - bit blocks , each having all white picture elements continue in an image , the compression circuit can be modified as shown in fig1 . in fig1 , a counter 71 is inserted between the or gate 30 and the flip - flop 31 . the output of the or gate 30 is a count - up signal which is applied via an inverter 70 to the counter 71 . if the counter 71 is a 3 - bit up counter , a carry signal ca is generated when eight consecutive blocks are all white picture elements . at this time , a &# 34 ; 0 &# 34 ; is set in the flip - flop 31 , via an inverter 72 . however , if at least one block includes at least one black picture element , the carry signal ca is not generated . then , a &# 34 ; 1 &# 34 ; is set in the flip - flop 31 . thus , 16 × 8 = 128 bits are compressed into one bit according to fig1 . therefore , the capacity of the line buffer can be further reduced . fig1 illustrates another embodiment of the present invention which is applied to an mr decoding circuit . a coded signal to be decoded is received by the communication controller 7 of fig1 and is stored in the main memory 5 , line by line , under the control of the host processor 1 . then the stored coded signal is entered from memory 5 into the mr decoding circuit 80 of fig1 , by the dmac 20 , via the decoded line fifo circuit 81 . a reference line is entered into decoding circuit 80 via reference line fifo circuit 23 . the decoded line derived from the mr decoding circuit 80 is written into the image memory area 10 of the main memory 5 and is also transferred to the compression circuit 27 . the compression operation is the same operation as that of the coding as shown in fig4 or 12 . the decoded line is used as the reference line when the successive line is decoded . the decoded line is compressed into the compression code lx and is stored in the line buffer 22 through the line buffer control circuit 21 . the compression code in the line buffer 22 is read out of the line buffer 22 as compression code lw and is applied to the expansion circuit 28 . the expansion operation is the same operation as that of coding as shown in fig5 . as shown in fig1 , the preparation circuit 26 &# 39 ; can be used to support the mr decoding operation . thus , the line buffer 22 can be integrated on a single semiconductor chip 300 with the dmac 20 , the line buffer control circuit 21 , the compression and expansion circuits 27 and 28 , fifo circuits 23 and 81 , and the mr decoding circuit 80 .