+function is_chunked()
+{
+ return $this->rd_is_chunked;
+}
+
+
+function chunked_content($content)
+{
+ if ($this->rd_zls) {
+ $cont_comp = $this->rd_zls->compress_chunk($content);
+ }
+ else {
+ $cont_comp = $content;
+ }
+ $cont_comp_l = mb_strlen($cont_comp, "ASCII");
+ // printf("CHUNK: [%s]\n", $content);
+
+ if ($this->is_chunked()) {
+ return (sprintf("%X\r\n", $cont_comp_l).$cont_comp."\r\n");
+ }
+ else {
+ return $cont_comp;
+ }
+}
+
+function chunked_fini()
+{
+ return sprintf("0\r\n");
+}
+
+