static int png_write_row(PNGContext *s, const uint8_t *data, int size)

{

    int ret;



    s->zstream.avail_in = size;

    s->zstream.next_in = (uint8_t *)data;

    while (s->zstream.avail_in > 0) {

        ret = deflate(&s->zstream, Z_NO_FLUSH);

        if (ret != Z_OK)

            return -1;

        if (s->zstream.avail_out == 0) {

            png_write_chunk(&s->bytestream, MKTAG('I', 'D', 'A', 'T'), s->buf, IOBUF_SIZE);

            s->zstream.avail_out = IOBUF_SIZE;

            s->zstream.next_out = s->buf;

        }

    }

    return 0;

}

static int png_write_row(PNGContext *s, const uint8_t *data, int size)

{

    int ret;



    s->zstream.avail_in = size;

    s->zstream.next_in = (uint8_t *)data;

    while (s->zstream.avail_in > 0) {

        ret = deflate(&s->zstream, Z_NO_FLUSH);

        if (ret != Z_OK)

            return -1;

        if (s->zstream.avail_out == 0) {

            png_write_chunk(&s->bytestream, MKTAG('I', 'D', 'A', 'T'), s->buf, IOBUF_SIZE);

            s->zstream.avail_out = IOBUF_SIZE;

            s->zstream.next_out = s->buf;

        }

    }

    return 0;

}

            png_write_chunk(&s->bytestream, MKTAG('I', 'D', 'A', 'T'), s->buf, IOBUF_SIZE);
static int FUNC_0(PNGContext *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

    int VAR_3;



    VAR_0->zstream.avail_in = VAR_2;

    VAR_0->zstream.next_in = (uint8_t *)VAR_1;

    while (VAR_0->zstream.avail_in > 0) {

        VAR_3 = deflate(&VAR_0->zstream, Z_NO_FLUSH);

        if (VAR_3 != Z_OK)

            return -1;

        if (VAR_0->zstream.avail_out == 0) {

            png_write_chunk(&VAR_0->bytestream, MKTAG('I', 'D', 'A', 'T'), VAR_0->buf, IOBUF_SIZE);

            VAR_0->zstream.avail_out = IOBUF_SIZE;

            VAR_0->zstream.next_out = VAR_0->buf;

        }

    }

    return 0;

}

static int FUNC_0(PNGContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ int VAR_3; VAR_0->zstream.avail_in = VAR_2; VAR_0->zstream.next_in = (uint8_t *)VAR_1; while (VAR_0->zstream.avail_in > 0) { VAR_3 = deflate(&VAR_0->zstream, Z_NO_FLUSH); if (VAR_3 != Z_OK)
return -1; if (VAR_0->zstream.avail_out == 0) { png_write_chunk(&VAR_0->bytestream, MKTAG('I', 'D', 'A', 'T'), VAR_0->buf, IOBUF_SIZE); VAR_0->zstream.avail_out = IOBUF_SIZE; VAR_0->zstream.next_out = VAR_0->buf; } } return 0; }