write string without try int string. for tryWriteIntSetEncoding, writeZipList
(s string)
| 297 | |
| 298 | // write string without try int string. for tryWriteIntSetEncoding, writeZipList |
| 299 | func (enc *Encoder) writeNanString(s string) error { |
| 300 | if enc.compress && len(s) > 20 { |
| 301 | err := enc.writeLZFString(s) |
| 302 | if err == nil { // lzf may failed, while out > in |
| 303 | return nil |
| 304 | } |
| 305 | } |
| 306 | return enc.writeSimpleString(s) |
| 307 | } |
| 308 | |
| 309 | func (enc *Encoder) WriteStringObject(key string, value []byte, options ...interface{}) error { |
| 310 | err := enc.beforeWriteObject(options...) |
no test coverage detected