| 262 | //--------------------------------------------------------------------------- |
| 263 | |
| 264 | static LASzipper* make_zipper(OStream* ost, const LASzip* laszip) |
| 265 | { |
| 266 | LASzipper* zipper = new LASzipper(); |
| 267 | if (zipper == 0) |
| 268 | { |
| 269 | log("ERROR: could not alloc laszipper\n"); |
| 270 | exit(1); |
| 271 | } |
| 272 | bool success; |
| 273 | if (ost->m_use_iostream) |
| 274 | success = zipper->open(*ost->streamo, laszip); |
| 275 | else |
| 276 | success = zipper->open(ost->ofile, laszip); |
| 277 | if (!success) |
| 278 | { |
| 279 | log("ERROR: could not open laszipper with %s because %s\n", ost->m_filename, zipper->get_error()); |
| 280 | exit(1); |
| 281 | } |
| 282 | return zipper; |
| 283 | } |
| 284 | |
| 285 | //--------------------------------------------------------------------------- |
| 286 | |